[Bug 25123] New: MaxFines does not count the current updating fine
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Bug ID: 25123 Summary: MaxFines does not count the current updating fine Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so. To test: 1 - Set maxFine to 5 2 - Create an overdue amount of 4.99 for a patron 3 - Set an itemtype to have a fine of $.10 per day 4 - Checkout an item of that type to a patron and backdate the due date so it is overdue 5 - Run fines.pl with -v 6 - Note the fine is reduced from $.10 (or a multiple) to .01 7 - Run it again, a second cent is added 8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting -- 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=25123 Nick Clemens <nick@bywatersolutions.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=25123 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 102812 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102812&action=edit Bug 25123: Unit tests -- 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=25123 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 102813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102813&action=edit Bug 25123: Count the current fine when reducing for maxFine If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so. To test: 1 - Set maxFine to 5 2 - Create an overdue amount of 4.99 for a patron 3 - Set an itemtype to have a fine of $.10 per day 4 - Checkout an item of that type to a patron and backdate the due date so it is overdue 5 - Run fines.pl with -v 6 - Note the fine is reduced from $.10 (or a multiple) to .01 7 - Run it again, a second cent is added 8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting 9 - Apply patch 10 - Note the fine is now reduced to 0 and nothing is added to account -- 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=25123 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com | |, | |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=25123 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |25127 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25127 [Bug 25127] Fines with an amountoutstanding of 0 can be created due to maxFine but cannot be forgiven -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=24146 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Comment on attachment 102813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102813 Bug 25123: Count the current fine when reducing for maxFine Review of attachment 102813: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=25123&attachment=102813) ----------------------------------------------------------------- ::: C4/Overdues.pm @@ +555,2 @@
$accountline = $overdue; next;
I wonder if it might be simpler to just drop the call to 'next' instead of adding the count line? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102813|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 102920 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102920&action=edit Bug 25123: Count the current fine when reducing for maxFine If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so. To test: 1 - Set maxFine to 5 2 - Create an overdue amount of 4.99 for a patron 3 - Set an itemtype to have a fine of $.10 per day 4 - Checkout an item of that type to a patron and backdate the due date so it is overdue 5 - Run fines.pl with -v 6 - Note the fine is reduced from $.10 (or a multiple) to .01 7 - Run it again, a second cent is added 8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting 9 - Apply patch 10 - Note the fine is now reduced to 0 and nothing is added to account -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102812|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 103232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103232&action=edit Bug 25123: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #102920|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 103233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103233&action=edit Bug 25123: Count the current fine when reducing for maxFine If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so. To test: 1 - Set maxFine to 5 2 - Create an overdue amount of 4.99 for a patron 3 - Set an itemtype to have a fine of $.10 per day 4 - Checkout an item of that type to a patron and backdate the due date so it is overdue 5 - Run fines.pl with -v 6 - Note the fine is reduced from $.10 (or a multiple) to .01 7 - Run it again, a second cent is added 8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting 9 - Apply patch 10 - Note the fine is now reduced to 0 and nothing is added to account Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 103234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103234&action=edit Bug 25123: (QA follow-up) Re-used variable name Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Clear concise code change, tests read well and pass, QA script passes and change works as expected.. Signing off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What about the FIXME a couple of lines above? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #9)
What about the FIXME a couple of lines above?
That behaviour doesn't change, and is still a valid question, how did we get two fines on one issue and how should we resolve? But these patches fix the other case so I don't think we need to address here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 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=25123 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #103232|0 |1 is obsolete| | Attachment #103233|0 |1 is obsolete| | Attachment #103234|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103294 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103294&action=edit Bug 25123: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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=25123 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103295&action=edit Bug 25123: Count the current fine when reducing for maxFine If maxFine is set, we total the patrons outstanding fines when making an adjustment, however, we neglect to count the amount of a currently updating fine when doing so. To test: 1 - Set maxFine to 5 2 - Create an overdue amount of 4.99 for a patron 3 - Set an itemtype to have a fine of $.10 per day 4 - Checkout an item of that type to a patron and backdate the due date so it is overdue 5 - Run fines.pl with -v 6 - Note the fine is reduced from $.10 (or a multiple) to .01 7 - Run it again, a second cent is added 8 - Repeat and note it keeps happening until the amount of the fine is reached, exceeding the maxFine setting 9 - Apply patch 10 - Note the fine is now reduced to 0 and nothing is added to account Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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=25123 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 103296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=103296&action=edit Bug 25123: (QA follow-up) Re-used variable name Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.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=25123 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Nick Clemens from comment #10)
(In reply to Jonathan Druart from comment #9)
What about the FIXME a couple of lines above?
That behaviour doesn't change, and is still a valid question, how did we get two fines on one issue and how should we resolve? But these patches fix the other case so I don't think we need to address here
Agreed.. when I last dug into this I believe I reached the conclusion that in automated fines code you cannot reach such a state.. but if people are using custom fines or adding things manually we can end up in all sorts of a mess... I know at least Katrin has her own fines code so I didn't remove it 'just in case', but would like to clean it up at some point. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Martin Renvoize from comment #14)
(In reply to Nick Clemens from comment #10)
(In reply to Jonathan Druart from comment #9)
What about the FIXME a couple of lines above?
That behaviour doesn't change, and is still a valid question, how did we get two fines on one issue and how should we resolve? But these patches fix the other case so I don't think we need to address here
I know at least Katrin has her own fines code so I didn't remove it 'just in case', but would like to clean it up at some point.
Guilty, but it's not a super bad hack... only a little bit bad. We just do the fine calculation differently, but use the standard methods for triggering and placing the fine (might have to make that work again with all the changes to accounts in last versions? :) I will see when it comes to it)
how did we get two fines on one issue and how should we resolve? Do you mean 2 accrueing fines? Or just fines? In some older DB we didn't do the FU > F change cleanly, so bad data could be an issue. Generally: Checkout Gets overdue + fines Renew Gets overdue + fines again Renew...
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 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=25123 --- Comment #16 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=25123 Joy Nelson <joy@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joy@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|20.05.00 |20.05.00, 19.11.06 released in| | --- Comment #17 from Joy Nelson <joy@bywatersolutions.com> --- Backported to 19.11.x for 19.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25123 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #18 from Lucas Gass <lucas@bywatersolutions.com> --- Tried to rebase tests for 19.05 but cannot make them pass, skipping this one for 19.05.x, if it is needed please rebase -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org