From e0211501384a72481ade9d6ca74162b7d7059dd7 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Thu, 4 Jul 2024 14:23:31 +0300 Subject: [PATCH] Bug 37255: Fix handling of "All" values on waiting hold cancellation policy If one creates a default waiting hold cancellation policy with patron categories set as "All" and itemtype set as "All", Koha breaks on 500 error. This happens because in we try to match template policy with "All" values either in category or itemtype with *, not undef. This patch fixes this. To test: 1. Create a new default waiting hold cancellation policy and set both patron category and itemtype as "All". 2. Save policy. => Error page for error 500 is displayed. 3. Apply this patch. 4. Reload page. => Page is displayed and policy listing displays new policy as it should. Sponsored-by: Koha-Suomi Oy Signed-off-by: Chris Cormack Signed-off-by: Pedro Amorim Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index b74d3cae59..f3e06a0043 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -884,14 +884,14 @@ [% IF ( waiting_hold_cancellation.defined && waiting_hold_cancellation != '' ) %] - [% IF c == '*' %] + [% IF c == undef %] All [% ELSE %] [% Categories.GetName(c) | html %] [% END %] - [% IF i == '*' %] + [% IF i == undef %] All [% ELSE %] [% ItemTypes.GetDescription(i,1) | html %] -- 2.39.5