From 5b8ba6782110521855b61af7c7594788340ad90a Mon Sep 17 00:00:00 2001 From: Alexander Blanchard Date: Mon, 15 Sep 2025 15:11:05 +0000 Subject: [PATCH] Bug 38633: Prevent holidays from being ignored If weekly repeatable holidays are set, Koha ignores these days when other holidays are set using the Holidays repeated yearly on a range option. To test: 1) Navigate to Tools > Calendar 2) Click on a weekend date on the calendar to open the Add New Holiday option 3) Give your holiday a title and select Holiday repeated every same day of the week 4) Click on the calendar again and set a holiday from 20 December 2021 to 06 January 2022 5) Give your holiday a title 6) Select Holidays repeated yearly on a range and click save 7) Using the calendar, navigate forwards to December 2024 and note that there are days that should be highlighted in the holdiay period that are not highlighted 8) Apply Patch 9) Run the reset_all command 10) Repeat the steps above 11) Notice that now when you click forwards through the calendar, all of the dates for your holidays repeated yearly on a range are still selected --- tools/newHolidays.pl | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl index 9cca4a9bc97..226328f975b 100755 --- a/tools/newHolidays.pl +++ b/tools/newHolidays.pl @@ -138,19 +138,12 @@ sub add_holiday { } elsif ( $newoperation eq 'holidayrangerepeat' ) { if (@holiday_list) { foreach my $date (@holiday_list) { - unless ( - $calendar->isHoliday( - $date->{local_c}->{day}, $date->{local_c}->{month}, $date->{local_c}->{year} - ) - ) - { - $calendar->insert_day_month_holiday( - day => $date->{local_c}->{day}, - month => $date->{local_c}->{month}, - title => $title, - description => $description - ); - } + $calendar->insert_day_month_holiday( + day => $date->{local_c}->{day}, + month => $date->{local_c}->{month}, + title => $title, + description => $description + ); } } } -- 2.39.5