[Bug 24146] New: Paying Accruing Fines prior to return causes another accruing fine when returned
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Bug ID: 24146 Summary: Paying Accruing Fines prior to return causes another accruing fine when returned Change sponsored?: --- Product: Koha Version: 19.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: kelly@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: nick@bywatersolutions.com In 19.05, when an accruing fine is paid prior to checking in the item, the fine will get re-accessed when the item is returned. This is caused by bug 22521 looking at the diff to this bug Lines 520-565 sub UpdateFine { it looks like we have changed the way Koha is checking for these fines and therefore reassessing a fine as there isn't one there anymore, as it has been paid. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Specifically: 538 "SELECT * FROM accountlines 539 WHERE borrowernumber=? AND 540 (( accounttype IN ('F','M') AND amountoutstanding<>0 ) OR 541 accounttype = 'FU' )" 542 ); To: 523 my $overdues = Koha::Account::Lines->search( 524 { 525 borrowernumber => $borrowernumber, 526 accounttype => [ 'OVERDUE', 'M' ], 527 amountoutstanding => { '<>' => 0 } 528 } In the first it is a closed fine more than 0 OR an accruing fine After the patch it must be greater than 0, so if someone pays off an accruing fine it will not be found. Could we possibly just search by issue_id? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Nick Clemens from comment #1)
Could we possibly just search by issue_id?
It's a little more complicated than that :(. We need to walk through all fines on the users account so we may honour `MaxFine`. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- The fix does appear to be trivial, but I think I'm going to submit a series of tests first to ensure I'm understanding the problem fully, bare with me whilst I write those. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 95992 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=95992&action=edit Bug 24146: Add test cases This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment. Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #4)
Created attachment 95992 [details] [review] Bug 24146: Add test cases
This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment.
Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour.
Do we need to take renewals into account? We already have the issue id, do we need the renewal iteration as well to ensure we target the correct paid fine? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #95992|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96005&action=edit Bug 24146: Add test cases This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment. Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96006 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96006&action=edit Bug 24146: Increment existing fine We should increment an existing fine even if it has been fully paid off whilst it is still incrementing and not create a new fine. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Right, I've commented the tests a bit further and I think it shows we're testing the renewal case. The second patch fixes the error reported here, but the enhanced tests still do not fully pass... but I'm not entirely sure the tests are correct. The question is how should MaxFine act in the case of partially paid fines. Setting to NSO to get some more eyes. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96005|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96065 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96065&action=edit Bug 24146: Add test cases This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment. Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96006|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96066 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96066&action=edit Bug 24146: Increment existing fine We should increment an existing fine even if it has been fully paid off whilst it is still incrementing and not create a new fine. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 96067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96067&action=edit Bug 24146: Corrections to UpdateFine logic concerning maxFine The `maxFine` system preference actually refers to the amount of outsanding debt (in fines) a patron may have at a given time. This patch corrects the functionality of UpdateFine such that it properly respects that counter given the payment of accruing fines scenario. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96068 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96068&action=edit Bug 24146: Illustrate increasing and decreasing fine -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24186 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24186 [Bug 24186] maxFine can break fine reductions in updateFine -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96065|0 |1 is obsolete| | --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96069&action=edit Bug 24146: Add test cases This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment. Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96066|0 |1 is obsolete| | --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96070 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96070&action=edit Bug 24146: Increment existing fine We should increment an existing fine even if it has been fully paid off whilst it is still incrementing and not create a new fine. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96067|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96071 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96071&action=edit Bug 24146: Corrections to UpdateFine logic concerning maxFine The `maxFine` system preference actually refers to the amount of outsanding debt (in fines) a patron may have at a given time. This patch corrects the functionality of UpdateFine such that it properly respects that counter given the payment of accruing fines scenario. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96068|0 |1 is obsolete| | --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 96072 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96072&action=edit Bug 24146: Illustrate increasing and decreasing fine Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_05_target -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com Severity|normal |major -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|19.05 |master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96069|0 |1 is obsolete| | --- Comment #17 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97304&action=edit Bug 24146: Add test cases This patch adds test cases for both checking amountoutstanding values are handled correctly and also that the paid down accruing fines do not add additional fines on increment. Test plan: Read the changeset and asses whether the changes/additional tests are correct as per the expected behaviour. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96070|0 |1 is obsolete| | --- Comment #18 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97305&action=edit Bug 24146: Increment existing fine We should increment an existing fine even if it has been fully paid off whilst it is still incrementing and not create a new fine. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96071|0 |1 is obsolete| | --- Comment #19 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97306 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97306&action=edit Bug 24146: Corrections to UpdateFine logic concerning maxFine The `maxFine` system preference actually refers to the amount of outsanding debt (in fines) a patron may have at a given time. This patch corrects the functionality of UpdateFine such that it properly respects that counter given the payment of accruing fines scenario. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #96072|0 |1 is obsolete| | --- Comment #20 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 97307 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=97307&action=edit Bug 24146: Illustrate increasing and decreasing fine Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24408 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24408 [Bug 24408] Comparing floats in tests should not care about precision -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #21 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work everyone! Pushed to master for 20.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_05_target | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |joy@bywatersolutions.com Version(s)|20.05.00 |20.05.00, 19.11.03 released in| | --- Comment #22 from Joy Nelson <joy@bywatersolutions.com> --- Pushed to 19.11.x branch for 19.11.03 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hagud@orex.es --- Comment #23 from Hugo Agud <hagud@orex.es> --- just one question will be this bug backported to 19.05? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |rel_19_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martha Fuerst <mfuerst@hmcpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mfuerst@hmcpl.org --- Comment #24 from Martha Fuerst <mfuerst@hmcpl.org> --- Seconding the request to backport this to 19.05. -Marti Fuerst Huntsville-Madison County Public Library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Lisette Scheer <lisetteslatah@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisetteslatah@gmail.com --- Comment #25 from Lisette Scheer <lisetteslatah@gmail.com> --- (In reply to Martha Fuerst from comment #24)
Seconding the request to backport this to 19.05.
-Marti Fuerst Huntsville-Madison County Public Library
+1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org --- Comment #26 from George Williams (NEKLS) <george@nekls.org> --- If this could be backported to 19.05, we'd appreciate it. George -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #27 from Lucas Gass <lucas@bywatersolutions.com> --- i cannot make this patchset both work and pass tests in 19.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 --- Comment #28 from Lucas Gass <lucas@bywatersolutions.com> --- if this needs to be in 19.05.x please rebase so it will pass unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=25123 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24146 Marjorie Barry-Vila <marjorie.barry-vila@collecto.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@collect | |o.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org