From ad997a570bf5d3d1c4759caf9a9259f4f9ea5ca5 Mon Sep 17 00:00:00 2001 From: Lisette Scheer Date: Mon, 6 Oct 2025 15:26:10 +0000 Subject: [PATCH] Bug 35700: (QA follow-up) fix POD and $today This patch replaces the inncorrectly removed POD note and replaces $today with the more correct $date_to_run for checking if we should be skipping sending the message on the day. --- misc/cronjobs/holds/holds_reminder.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index c5c87278ff6..33ccfb37c8d 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -42,6 +42,7 @@ holds_reminder.pl -lettercode [ -c ][ -v ][ -library ][ -library ... ] [ -days ][ -mtt ... ][ -holidays ] + [ -date ] Options: -help brief help message @@ -188,7 +189,7 @@ GetOptions( 'library=s' => \@branchcodes, 'date=s' => \$date_input, 'holidays' => \$use_calendar, - 'mtt=s' => \@mtts, + 'mtt=s' => \@mtts ); pod2usage(1) if $help; pod2usage( -verbose => 2 ) if $man; @@ -241,11 +242,10 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP # If respecting calendar get the correct waiting since date my $waiting_date; if ($use_calendar) { - my $today = $date_to_run; my $calendar = Koha::Calendar->new( branchcode => $branchcode, days_mode => 'Calendar' ); #if today is a holiday skip sending the message - next if $calendar->is_holiday($today); + next if $calendar->is_holiday($date_to_run); { my $duration = DateTime::Duration->new( days => -$days ); $waiting_date = $calendar->addDays( $date_to_run, $duration ); #Add negative of days -- 2.39.5