If you have entered a value in the column "Decreased loan period for high holds" for a circulation rule - you can't delete that line. The only thing that will happend is that all numerical values are wiped out - giving today as duedate
It does appear to behave correctly in current master. Could you maybe verify if it's still an issue in newer versions and add a step by step on how to test?
We are facing similar problem on version 21.11, but with "Holds pickup period (day)" field. However in current master the problem field is "Decreased loan period for high holds" as Klas mentioned. To test: 1. Create 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 rule and set field "Decreased loan period for high holds" empty. 4. Delete the rule. => Rule is deleted successfully. 5. Create new rule, fill all fields expect field "Decreased loan period for high holds". 6. Delete the rule. => Rule is deleted successfully.
Also to add to this, logs show no error and browsers console shows no Javascript etc. errors.
Created attachment 143891 [details] [review] 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
Another side note, we are using bug 8367 so our problem with field "Holds pickup period (day)" comes from there and has nothing to with this bug.
(In reply to Klas Blomberg from comment #0) > If you have entered a value in the column "Decreased loan period for high > holds" for a circulation rule - you can't delete that line. > > The only thing that will happend is that all numerical values are wiped out > - giving today as duedate Confirmed on master.
Created attachment 143918 [details] [review] 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 <katrin.fischer.83@web.de>
Created attachment 144685 [details] [review] 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 <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Backported to 22.05.x for upcoming 22.05.09
applied to 21.11.x for 21.11.16
Not backported to 21.05.x