-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed allocation expiration task bug #401
Fixed allocation expiration task bug #401
Conversation
…ses of 'active' to 'expired', other statuses would stay as their current status after expiration date was reached.
This is going to break the Invoice report but it needs to be done. On the roadmap is a rework of how we handle "invoices" or payments. If an invoice isn't paid on time, the allocation should be set to expired and access to the resource should be blocked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
One side effect of this change is that all allocations with an end_date in the past will now be changed to expired every time this job is run. Here's a few cases where this may not be desired:
Perhaps a better approach would be to add other statuses here in the filter instead of removing the "Active". So maybe we come up with the list of statuses an allocation must be along with an end_date in the past that will trigger this change of status to "expired". That will make this job more predictable and allow other sites to modify the behavior if desired. Thoughts? |
Yes, that is definitely not ideal. We would not want already expired allocations to get 'expired' notices again. Based on what you're saying I think this would also run on allocations that have been denied and revoked too. We would want this to run on the following statuses: active, payment pending, payment requested, and unpaid. What we were seeing is the allocation end date would arrive and unless the status was 'active' the allocation status would not change to 'expired' The users would still get an email saying their allocation had expired but the status was still set to payment pending or payment requested. This would affect the plugins that sync looking for the 'expired' status and users on the allocation would still have access to the resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested functionality and LGTM
Resolved #378 : Fixed bug that would only update allocation statuses of 'active' to 'expired', other statuses would stay as their current status after expiration date was reached.
NOTE: Need redis running and possibly MailHog to have the scheduler work
Tested fix through the following:
Tested bug through the following: