From 2570fe4f67e73443178561e27635d621df2eed4d Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Tue, 15 Nov 2022 09:31:13 +0200 Subject: [PATCH] Bug 30694: Set decreaseloanholds undef when deleting circulation rule When one tries to delete rule with field "Decreased loan period for high holds" filled, delete fails without errors. This happens because rule isn't set in code section handling the delete in smart-rules.pl. To test: 1. Create a new circulation rule and fill all fields. 2. Try to delete the rule. => Rule isn't deleted, all fields except "Decreased loan period for high holds" are now empty or have value "Unlimited". 3. Modify the rule and set field "Decreased loan period for high holds" empty. 4. Delete the rule. => Rule is deleted successfully. 5. Create a new rule, fill all fields expect field "Decreased loan period for high holds". 6. Delete the rule. => Rule is deleted successfully. 7. Apply this patch. 8. Again create a new rule with field "Decreased loan period for high holds" filled. 9. Try to delete the rule. => Rule is deleted successfully. Sponsored-by: Koha-Suomi Oy Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 91fc31c32ba14817d989bcd34854ebc8e41fa936) Signed-off-by: Jacob O'Mara (cherry picked from commit 63fd9be98befc0be358b0074b94253befa929f48) Signed-off-by: Lucas Gass (cherry picked from commit 4bc18581f81aaa7872fd785f215acf2b4a4ce280) Signed-off-by: Arthur Suzuki --- admin/smart-rules.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 31ed87a83a..e74eb322f2 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -109,6 +109,7 @@ if ($op eq 'delete') { cap_fine_to_replacement_price => undef, article_requests => undef, note => undef, + decreaseloanholds => undef, } } ); -- 2.39.5