Bug 32048

Summary: Calendar adding holidays repeated
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: ToolsAssignee: Laura Escamilla <Laura.escamilla>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, Laura.escamilla, lucas, salah.ghedda
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38357
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.04,22.11.11
Circulation function:
Attachments: Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable

Description Nick Clemens (kidclamp) 2022-10-31 10:07:25 UTC
It seems something is getting cached when adding holidays

To recreate:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again
Comment 1 Laura Escamilla 2023-08-28 14:22:12 UTC
Created attachment 154885 [details] [review]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable

To test:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again.
5 - Apply patch and restart_all. 
6 - Repeat steps 1-3. Notice that the holiday from the 1st to the 5th is no longer added and it has properly been cleared from the cache. 
7 - Sign off! :D
Comment 2 Salah Ghedda 2023-09-11 14:45:45 UTC
Created attachment 155497 [details] [review]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>


Signed Off
Comment 3 Katrin Fischer 2023-09-17 21:02:05 UTC
Created attachment 155766 [details] [review]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable

When adding and deleting holidays, holidays might return
unexpectedly.

To test:
1 - Enter a holiday repeated yearly on a range from the 1st of the month to the 5th
2 - Delete it
3 - Add a new holiday from the 20th to the 25th
4 - When saved, the holiday from the 1st to the 5th is also added again.
5 - Apply patch and restart_all.
6 - Repeat steps 1-3. Notice that the holiday from the 1st to the 5th is no longer added and it has properly been cleared from the cache.
7 - Sign off! :D

Signed-off-by: Salah Ghedda <salah.ghedda@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2023-09-17 21:02:37 UTC
Nice commit messages please!

Not sure if this can be unit tested, but we do have a change in a core module.
Comment 5 Tomás Cohen Arazi (tcohen) 2023-09-18 18:54:36 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-09-18 21:45:57 UTC
Pushed to 23.05.x for 23.05.04
Comment 7 Matt Blenkinsop 2023-10-12 16:00:38 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x