From 54f4d2a8a38fc69c7f9045fe968398b1cba4702f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 26 May 2020 10:10:52 +0200 Subject: [PATCH] Bug 25601: (bug 18928 follow-up) Fix "Unset" for "return policy for $branch" returnbranch has to pass an itemtype key when setting the rule (here setting it to unlimited for any item types) Test plan: 1. Go the "Circulation and fine rules" admin page 2. Set a rule for "Default checkout, hold and return policy" 3. Unset it 4. Select a library 5. Set a rule for "Default checkout, hold and return policy" 6. Unset it Display should be consistent with what you selected Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Tomas Cohen Arazi --- admin/smart-rules.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 6bea920dd90..195ca818afc 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -161,6 +161,7 @@ elsif ($op eq 'delete-branch-cat') { branchcode => $branch, categorycode => undef, rules => { + max_holds => undef, patron_maxissueqty => undef, patron_maxonsiteissueqty => undef, } @@ -169,11 +170,11 @@ elsif ($op eq 'delete-branch-cat') { Koha::CirculationRules->set_rules( { branchcode => $branch, + itemtype => undef, rules => { holdallowed => undef, hold_fulfillment_policy => undef, returnbranch => undef, - max_holds => undef, } } ); -- 2.26.2