Description
Kyle M Hall
2020-01-08 20:27:25 UTC
Created attachment 97055 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Created attachment 97544 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Kyle, can you provide tests please? (In reply to Jonathan Druart from comment #3) > Kyle, can you provide tests please? Absolutely! Created attachment 97750 [details] [review] Bug 24380 - Unit Test Created attachment 97751 [details] [review] Bug 24380 - Unit Test Created attachment 97752 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> CONFLICT (content): Merge conflict in t/db_dependent/Circulation/Returns.t Created attachment 99536 [details] [review] Bug 24380 - Unit Test Created attachment 99537 [details] [review] Bug 24380 - Unit Test Created attachment 99538 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> I have a vague recollection of Katrin being keen to NOT do this.. perhaps it should be behind YASP (Yet Another System Preference) (In reply to Martin Renvoize from comment #12) > I have a vague recollection of Katrin being keen to NOT do this.. perhaps it > should be behind YASP (Yet Another System Preference) Yes, we have an alternate fine calculation that is used with some of our libraries - recalculating would come up with the wrong values. So we have turned off the pref there. I think while we coudl argue that's our problem - there is also the staticfines.pl job and possible others with similar needs. I'd really like to put this under the same or a separate pref. Created attachment 102574 [details] [review] Bug 24380 - Unit Test Created attachment 102575 [details] [review] Bug 24380 - Unit Test Created attachment 102576 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Created attachment 102577 [details] [review] Bug 24380: Add syspref CalculateFinesOnBackdate (In reply to Kyle M Hall from comment #17) > Created attachment 102577 [details] [review] [review] > Bug 24380: Add syspref CalculateFinesOnBackdate Thank you Kyle! Created attachment 102894 [details] [review] Bug 24380 - Unit Test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 102895 [details] [review] Bug 24380 - Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 102896 [details] [review] Bug 24380: Add syspref CalculateFinesOnBackdate Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks Kyle, all works as expected.. Signing off Created attachment 102981 [details] [review] Bug 24380: Unit Test Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 102982 [details] [review] Bug 24380: Backdated returns do not update fines unless CalculateFinesOnReturn is enabled In Koha 18.11 backdating a return triggered a recalculation of the fine. This was removed in bug 14591, and I believe it was in error. The bug report itself has no justification for the change in behavior. Test Plan: 1) Disable CalculateFinesOnReturn 2) Backdate an overdue with fines, note the fine does not change 3) Apply this patch 4) Repeat step 2 5) The fine should be updated! Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 102983 [details] [review] Bug 24380: Add syspref CalculateFinesOnBackdate Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 102984 [details] [review] Bug 24380: (QA follow-up) Do not use compare float with precision forbidden pattern: Do not use compare float with precision (bug 24408). Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 102985 [details] [review] Bug 24380: Simplify condition Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (In reply to Jonathan Druart from comment #27) > Created attachment 102985 [details] [review] [review] > Bug 24380: Simplify condition > > Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> IMO it eases the read of the condition, feel free to disagree and obsolete. Nice work everyone! Pushed to master for 20.05 does not apply cleanly to 19.11.x branch. please rebase if needed. |