Bug 40905

Summary: Past unique holidays not shown when enabling Show past checkbox
Product: Koha Reporter: Slava Shishkin <slavashishkin>
Component: ToolsAssignee: Slava Shishkin <slavashishkin>
Status: Pushed to main --- QA Contact: Nick Clemens (kidclamp) <nick>
Severity: enhancement    
Priority: P5 - low CC: lucas, nick
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
26.05.00
Circulation function:
Attachments: Bug 40905: Fix "Show past entries" checkbox in unique holidays
Bug 40905: Fix "Show past entries" checkbox in unique holidays
Bug 40905: Fix "Show past entries" checkbox in unique holidays
Bug 40905: (QA follow-up) Apply same fix for exceptions table

Description Slava Shishkin 2025-09-30 11:53:20 UTC
In Tools → Calendar → Unique holidays, enabling the Show past entries checkbox does not work correctly.

Steps to reproduce:
1. Go to Tools → Calendar
2. Select a branch with past unique holidays
3. In the section Unique holidays, click the checkbox Show past entries
4. Past entries are not displayed
Comment 1 Slava Shishkin 2025-09-30 12:21:49 UTC
Created attachment 187094 [details] [review]
Bug 40905: Fix "Show past entries" checkbox in unique holidays

Test plan:
1. Go to Tools → Calendar.
2. Select a branch with past unique holidays.
   If you don't have past closed days: Create a new holiday in a past month or so.
3. In the Unique holidays section, enable "Show past entries".
4. Past entries are not displayed.
5. Apply patch:
6. Repeat the steps above.
7. Past entries are displayed immediately.
Comment 2 Owen Leonard 2026-01-06 13:38:19 UTC
Created attachment 190936 [details] [review]
Bug 40905: Fix "Show past entries" checkbox in unique holidays

Test plan:
1. Go to Tools → Calendar.
2. Select a branch with past unique holidays.
   If you don't have past closed days: Create a new holiday in a past
   month or so.
3. In the Unique holidays section, enable "Show past entries".
4. Past entries are not displayed.
5. Apply patch:
6. Repeat the steps above.
7. Past entries are displayed immediately.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Nick Clemens (kidclamp) 2026-01-16 13:45:57 UTC
Created attachment 191563 [details] [review]
Bug 40905: Fix "Show past entries" checkbox in unique holidays

Test plan:
1. Go to Tools → Calendar.
2. Select a branch with past unique holidays.
   If you don't have past closed days: Create a new holiday in a past
   month or so.
3. In the Unique holidays section, enable "Show past entries".
4. Past entries are not displayed.
5. Apply patch:
6. Repeat the steps above.
7. Past entries are displayed immediately.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2026-01-16 13:45:59 UTC
Created attachment 191564 [details] [review]
Bug 40905: (QA follow-up) Apply same fix for exceptions table

This table also has a show past holidays button, we need the same fix

To test:
1 - Spam holidays into both tables
    You can run the SQL commands below a few times each
INSERT INTO special_holidays (branchcode, day, month, year,isexception, title,description) VALUES ('CPL',FLOOR(RAND() * 28) + 1,FLOOR(RAND() * 12) + 1,FLOOR(RAND() * 6) + 2020,0,LEFT(UUID(),8),UUID());

INSERT INTO special_holidays (branchcode, day, month, year,isexception, title,description) VALUES ('CPL',FLOOR(RAND() * 28) + 1,FLOOR(RAND() * 12) + 1,FLOOR(RAND() * 6) + 2020,1,LEFT(UUID(),8),UUID());

2 - Go to Tools->Calendar
3 - Click 'Show past holidays' for exceptions and unique holidays
4 - Confirm checking and unchecking work on both tables

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Lucas Gass (lukeg) 2026-01-30 17:56:18 UTC
Nice work everyone!

Pushed to main for 26.05