Summary: | Fines cronjob does not update fines on holidays when finesCalendar is set to ignore | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Fines and fees | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, fridolin.somers, jonathan.druart, martin.renvoize, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
Prior to this patchset the fines cronjob would not run on holidays. This was to ensure that dropbox mode correctly decremented fines.
Dropbox mode has been rewritten and we can now correctly calculate and charge fines on holidays (or not) following the calendar and system preferences.
|
Version(s) released in: |
21.05.00,20.11.02,20.05.08
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 27835 | ||
Attachments: |
Bug 27180: Update fines on holidays
Bug 27180: Update fines on holidays Bug 27180: (follow-up) Remove unused %is_holiday Bug 27180: Update fines on holidays Bug 27180: (follow-up) Remove unused %is_holiday |
Description
Nick Clemens (kidclamp)
2020-12-09 15:34:21 UTC
Created attachment 114287 [details] [review] Bug 27180: Update fines on holidays This patch removes code that prevents fines from being update on holidays. The fines are already being calculated, and that takes the calendar into account if needed, so fines won't be assessed on holidays if they shouldn't. To test: 1 - set finesCalendar to 'ignore' 2 - Checkout an item due yesterday 3 - Ensure circ rules have a fine amount set 4 - Make today a holiday 5 - run fines.pl 6 - No fine assessed 7 - Apply patch 8 - run fines.pl 9 - Fine assessed! 10 - set finesCalendar to 'use' 11 - checkout an item, due yesterday 12 - run fines.pl 13 - no fine assessed Created attachment 114404 [details] [review] Bug 27180: Update fines on holidays This patch removes code that prevents fines from being update on holidays. The fines are already being calculated, and that takes the calendar into account if needed, so fines won't be assessed on holidays if they shouldn't. To test: 1 - set finesCalendar to 'ignore' 2 - Checkout an item due yesterday 3 - Ensure circ rules have a fine amount set 4 - Make today a holiday 5 - run fines.pl 6 - No fine assessed 7 - Apply patch 8 - run fines.pl 9 - Fine assessed! 10 - set finesCalendar to 'use' 11 - checkout an item, due yesterday 12 - run fines.pl 13 - no fine assessed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> This makes allot of sense and cleans up the code... Works as expected, signing off. Created attachment 114706 [details] [review] Bug 27180: (follow-up) Remove unused %is_holiday I think you could probably set this to PQA Victor.. I'd call your followup a 'QA follow-up) as it's trivial and works well.. Created attachment 115228 [details] [review] Bug 27180: Update fines on holidays This patch removes code that prevents fines from being update on holidays. The fines are already being calculated, and that takes the calendar into account if needed, so fines won't be assessed on holidays if they shouldn't. To test: 1 - set finesCalendar to 'ignore' 2 - Checkout an item due yesterday 3 - Ensure circ rules have a fine amount set 4 - Make today a holiday 5 - run fines.pl 6 - No fine assessed 7 - Apply patch 8 - run fines.pl 9 - Fine assessed! 10 - set finesCalendar to 'use' 11 - checkout an item, due yesterday 12 - run fines.pl 13 - no fine assessed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 115229 [details] [review] Bug 27180: (follow-up) Remove unused %is_holiday Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.02 Pushed to 20.05.x for 20.05.08 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. Nick, please fill the release notes. It appears like now we are charging on closed days with this bug... see bug 27835. For our use case that is definitely unwanted behaviour and we need to fix it asap. I know I QA'd that... but I was under the assumtpion it would only affect finescalendar = ignore... which it doesn't. |