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: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to