Summary: | Editing circ rule with Overdue fines cap (amount) results in data loss and extra fines | ||
---|---|---|---|
Product: | Koha | Reporter: | Donna <bwsdonna> |
Component: | Fines and fees | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, kyle, lucas, martin.renvoize, sbrown, victor, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00,21.11.06,21.05.15,20.11.19
|
|
Circulation function: | |||
Attachments: |
Bug 30346: Correctly transfer values when editing rules
Bug 30346: Correctly transfer values when editing rules Bug 30346: Correctly transfer values when editing rules |
Description
Donna
2022-03-23 19:20:12 UTC
+1, unexpected changes to circ & fine rules are exceptionally unwelcome. This is because we are erroneously trying get the value from the 'Cap fine at replacement price' column which is a checked or not checked value. When we go through each of the columns we copy the current values over. There is a line like: else if ( i == 15 ) And that is wrong. Created attachment 133198 [details] [review] Bug 30346: Correctly transfer values when editing rules To test: --Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it -Save the new (or edited) rule. -Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank -Save your edited rule - "Overdue fines cap (amount)" will save as blank. Apply patch --Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule. -Save the rule -Try ediding the rule and make sure both of those values now save correctly. -Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right. Created attachment 133199 [details] [review] Bug 30346: Correctly transfer values when editing rules To test: --Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it -Save the new (or edited) rule. -Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank -Save your edited rule - "Overdue fines cap (amount)" will save as blank. Apply patch --Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule. -Save the rule -Try ediding the rule and make sure both of those values now save correctly. -Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Created attachment 133388 [details] [review] Bug 30346: Correctly transfer values when editing rules To test: --Create a circulation rule with a value in "Overdue fines cap (amount), or edit an existing rule to add it -Save the new (or edited) rule. -Edit the same rule again to change any other field. Note that "Overdue fines cap (amount)" is now blank -Save your edited rule - "Overdue fines cap (amount)" will save as blank. Apply patch --Create a circ rule with a value in Overdue fines cap (amount) and check "Cap fine at replacement price" for that same rule. -Save the rule -Try ediding the rule and make sure both of those values now save correctly. -Add several more rules and try playing with both "Cap fine at replacement price" and "Overdue fines cap (amount)". Make sure everything saves right. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Good catch, PQA Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.06 Pushed to 21.05.x for 21.05.15 *** Bug 29610 has been marked as a duplicate of this bug. *** Backported: Pushed to 20.11.x branch for 20.11.19 Does this need to be backported to 19.11.x? |