Bug 24651 - Add --maxdays option to fines.pl to reduce the chance of re-processing very old, already capped, fines.
Summary: Add --maxdays option to fines.pl to reduce the chance of re-processing very o...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-13 10:19 UTC by Martin Renvoize
Modified: 2020-02-17 11:54 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
20.05.00


Attachments
Bug 24651: Add maxdays option to fines cronjob (1.54 KB, patch)
2020-02-13 10:49 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24651: Add maxdays option to fines cronjob (1.61 KB, patch)
2020-02-14 12:06 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24651: Add maxdays option to fines cronjob (1.69 KB, patch)
2020-02-14 12:30 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2020-02-13 10:19:34 UTC
This would lead to a performance improvement by simply lowering the number of records that need to be processed.  It would be safe to limit the overdues processed to those under X days overdues given that circulation policy often caps fines at a maximum after a number of days.
Comment 1 Martin Renvoize 2020-02-13 10:49:19 UTC
Created attachment 98806 [details] [review]
Bug 24651: Add maxdays option to fines cronjob

This patch adds an optional maxdays parameter to the fines.pl cronjob.
The new parameter allows system administrators to set a maximum number
of days for the job to process overdues.  This can improve performance.
Comment 2 Martin Renvoize 2020-02-14 12:06:42 UTC
Created attachment 98933 [details] [review]
Bug 24651: Add maxdays option to fines cronjob

This patch adds an optional maxdays parameter to the fines.pl cronjob.
The new parameter allows system administrators to set a maximum number
of days for the job to process overdues.  This can improve performance.

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Martin Renvoize 2020-02-14 12:10:43 UTC
This has been applied and tested on Cheshire Shared Services production system and they are pleased with the results. Setting the parameter to 6 months has meant that they do not miss any fines in their environment (as all caps will have been reached by this point), but reduced the runtime from 10 hours to 6 minutes (they have a lot of historical checkouts).

Sally asked me to add her signoff line for her :)
Comment 4 Kyle M Hall 2020-02-14 12:30:17 UTC
Created attachment 98938 [details] [review]
Bug 24651: Add maxdays option to fines cronjob

This patch adds an optional maxdays parameter to the fines.pl cronjob.
The new parameter allows system administrators to set a maximum number
of days for the job to process overdues.  This can improve performance.

Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Martin Renvoize 2020-02-17 11:32:16 UTC
Nice work everyone!

Pushed to master for 20.05