From 5a3a9a17c643b056594407af0ffba2998113a1a2 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 12 Apr 2021 13:22:50 +0000 Subject: [PATCH] Bug 27069: (follow-up) Only display rules if one is set Testing that the rule is != 'hold_allowed' is true for each itemtype where the rule is not set. This means it appears that no holds are allowed for any item type if no rules are set To test: 1 - With a fresh testing DB or no holdallowed rule set, you can use SQl below to clear: DELETE from circuation_rules WHERE rule_name='holdallowed'; 2 - Load smart-rules.pl (Administration->Circulation and fines rules) 3 - Scroll to "Default holds policy by item type" 4 - Note all item types appear as 'No holds allowed' 5 - Apply patch 6 - Reload 7 - All clear 8 - Confirm adding rules displays correctly Signed-off-by: Jonathan Druart --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 590c9a8d67..79a87ae164 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 @@ -916,7 +916,7 @@ [% SET hold_fulfillment_policy = CirculationRules.Search( branchcode, undef, i.itemtype, 'hold_fulfillment_policy' ) %] [% SET returnbranch = CirculationRules.Search( branchcode, undef, i.itemtype, 'returnbranch' ) %] - [% IF holdallowed != 'not_allowed' || hold_fulfillment_policy || returnbranch %] + [% IF holdallowed || hold_fulfillment_policy || returnbranch %] [% i.translated_description | html %] -- 2.39.5