Bugzilla – Attachment 155766 Details for
Bug 32048
Calendar adding holidays repeated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
Bug-32048-Added-clear-cache-routine-to-deleteholid.patch (text/plain), 1.56 KB, created by
Katrin Fischer
on 2023-09-17 21:02:05 UTC
(
hide
)
Description:
Bug 32048: Added clear cache routine to delete_holiday_range_repeatable
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-17 21:02:05 UTC
Size:
1.56 KB
patch
obsolete
>From 474663bffec403136b8c7849d7d2ceafad7fbd8c Mon Sep 17 00:00:00 2001 >From: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Date: Mon, 28 Aug 2023 14:20:17 +0000 >Subject: [PATCH] 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> >--- > C4/Calendar.pm | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/C4/Calendar.pm b/C4/Calendar.pm >index 257119c8e3..6344bedd1e 100644 >--- a/C4/Calendar.pm >+++ b/C4/Calendar.pm >@@ -603,6 +603,11 @@ sub delete_holiday_range_repeatable { > my $dbh = C4::Context->dbh(); > my $sth = $dbh->prepare("DELETE FROM repeatable_holidays WHERE (branchcode = ?) AND (day = ?) AND (month = ?)"); > $sth->execute($self->{branchcode}, $options{day}, $options{month}); >+ >+ # changed the 'single_holidays' table, lets force/reset its cache >+ my $cache = Koha::Caches->get_instance(); >+ my $key = $self->{branchcode} . "_holidays"; >+ $cache->clear_from_cache($key); > } > > =head2 delete_exception_holiday_range >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32048
:
154885
|
155497
| 155766