Similar to bug 29610, when editing a rule that has an Overdue fines cap (amount) the data in that field is lost. Duplicating/copying a rule with an Overdue fines cap amount does not bring that value over either. To recreate: --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.
+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?