Items that were overdue and still out as of 5/26 (date of Upgrade) were charged overdue fines as of 5/26. When the items DO come back, the overdue fines are calculated again from the due date to the date of checkin. Therefore the patron is being charged double overdue fines from the original date up to 5/26. This is caused by issues.date_due being changed to a datetime, with the hour/minute/secons time portion defaulting to 00:00:00. It should be 23::50::00 instead.
Created attachment 9889 [details] [review] Bug 8182 - Problem with overdue fine calculations after upgrade Items that were overdue and still out as of 5/26 (date of Upgrade) were charged overdue fines as of 5/26. When the items DO come back, the overdue fines are calculated again from the due date to the date of checkin. Therefore the patron is being charged double overdue fines from the original date up to 5/26. This is caused by issues.date_due being changed to a datetime, with the hour/minute/secons time portion defaulting to 00:00:00. It should be 23::50::00 instead. This is an unusual patch as it modifies a previous database update. This make sense because if a install has already been updated past the db rev update, this fix will be too late. It will only help those that have not updated past that db revision.
Created attachment 9890 [details] [review] Bug 8182 - Problem with overdue fine calculations after upgrade Items that were overdue and still out as of 5/26 (date of Upgrade) were charged overdue fines as of 5/26. When the items DO come back, the overdue fines are calculated again from the due date to the date of checkin. Therefore the patron is being charged double overdue fines from the original date up to 5/26. This is caused by issues.date_due being changed to a datetime, with the hour/minute/secons time portion defaulting to 00:00:00. It should be 23::50::00 instead. This is an unusual patch as it modifies a previous database update. This make sense because if a install has already been updated past the db rev update, this fix will be too late. It will only help those that have not updated past that db revision.
*** Bug 8165 has been marked as a duplicate of this bug. ***
Are we sure we can't fix those who have upgraded already too? With an update statement?
Created attachment 9894 [details] [review] Bug 8182 - Problem with overdue fine calculations after upgrade Items that were overdue and still out as of 5/26 (date of Upgrade) were charged overdue fines as of 5/26. When the items DO come back, the overdue fines are calculated again from the due date to the date of checkin. Therefore the patron is being charged double overdue fines from the original date up to 5/26. This is caused by issues.date_due being changed to a datetime, with the hour/minute/secons time portion defaulting to 00:00:00. It should be 23::50::00 instead. This is an unusual patch as it modifies a previous database update. This make sense because if a install has already been updated past the db rev update, this fix will be too late. It will only help those that have not updated past that db revision. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Created attachment 9895 [details] [review] Bug 8182 - Problem with overdue fine calculations after upgrade Items that were overdue and still out as of 5/26 (date of Upgrade) were charged overdue fines as of 5/26. When the items DO come back, the overdue fines are calculated again from the due date to the date of checkin. Therefore the patron is being charged double overdue fines from the original date up to 5/26. This is caused by issues.date_due being changed to a datetime, with the hour/minute/secons time portion defaulting to 00:00:00. It should be 23::50::00 instead. This is an unusual patch as it modifies a previous database update. This make sense because if a install has already been updated past the db rev update, this fix will be too late. It will only help those that have not updated past that db revision. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed off the fix, it will fix anyone upgrading from 3.6/3.4 .. but I think we still need a follow up to catch the ones who already have. Or at least a nice easy recipe for them to follow to clean up.
NOTE: This is only a problem on upgrades, fresh installs are ok I'd definitely like it in before the 3.8.2 release
Simple patch to set the due time to the end of the day, rather than the beginning. Marking as Passed QA. I don't think there is going to be a good way to repeal any fines erroneously assessed in this way; while accountlines does have a timestamp field, it is updated every time the fine increments or is paid down, so we lose data about when the overdue was originally assessed. This needs to be fixed with a rebuilding of the accounts system, but that's beyond the scope of this particular issue. To clean up, the key variable would be the date of upgrade... anything due on that date could be credited 1 day's worth against it's overdue value... but this doesn't factor in after-due renewals, or materials that have already been returned (paid or not).
Patch pushed, I agree it will be hard to fix already upgraded libraries. One question: why have you defined 23:59:00, and not 23:59:59 ?
Either way should be functionally equivalent, at least until we implement fines at the per-second level ; ) Kyle (In reply to comment #10) > Patch pushed, I agree it will be hard to fix already upgraded libraries. > > One question: why have you defined 23:59:00, and not 23:59:59 ?
Pushed to 3.8.x, will be in 3.8.2