[Koha-bugs] [Bug 30666] New: Holds reminder cronjob (holds_reminder.pl) uses DataTime::subtract wrong
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue May 3 12:27:57 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30666
Bug ID: 30666
Summary: Holds reminder cronjob (holds_reminder.pl) uses
DataTime::subtract wrong
Change sponsored?: ---
Product: Koha
Version: 21.05
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Command-line Utilities
Assignee: koha-bugs at lists.koha-community.org
Reporter: kyle at bywatersolutions.com
QA Contact: testopia at bugs.koha-community.org
CC: robin at catalyst.net.nz
In holds_reminder.pl, the script loops over all available branchcodes. For each
iteration of the loop, if not using the calendar, the script subtracts the days
parameter from the current date to get the waiting date threshold. The problem
is that this method alters the DateTime object in $date_to_run, so for each
iteration of the loop, the waiting date becomes farther and farther in the
past, when it should always be the same!
The solution is to either clone the "date to run" for each call to subtract, or
to move it out of the loop since it doesn't need to be recalculated each time.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list