[Bug 27927] New: longoverdue cronjob renews items before marking lost when both RenewAccruingItemWhenPaid and WhenLostForgiveFine are enabled
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Bug ID: 27927 Summary: longoverdue cronjob renews items before marking lost when both RenewAccruingItemWhenPaid and WhenLostForgiveFine are enabled 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 longoverdue.pl calls 'LostItem' C4::Circulation::LostItem calls _FixOverduesOnReturn C4::Circulation::_FixOverduesOnReturn create a Koha::Account::Line for the amount of the accruing fine and calls apply passing the existing fine Koha::Account::Line calls renew_item when the fee is paid The item is then renewed, a notice (potentially) sent, and then the item marked lost and charged The sending of a renewal notice is quite confusing to patrons -- 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=27927 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org Depends on| |23051 See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=9805 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23051 [Bug 23051] Add ability to optionally renew fine accruing items when all fines on item are paid off -- 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=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.isherwood@ptfs-europ | |e.com, | |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=27927 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118766 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118766&action=edit Bug 27927: Prevent renewal on lost forgive The `RenewAccruingItemWhenPaid` preference should only renew upon payment (and writeoff?) and not upon automatic forgival triggered by `WhenLostForgiveFine`. -- 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=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.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=27927 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This will need some tests writing, but I wanted to get the patch up here and start proceeding with testing. I've currently only prevented the renewal for 'FORGIVEN' credit types, I wonder if we aught to exclude any other credit types...? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14825 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118766|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118781&action=edit Bug 27927: Prevent renewal on lost forgive The `RenewAccruingItemWhenPaid` preference should only renew upon payment (and writeoff?) and not upon automatic forgival triggered by `WhenLostForgiveFine`. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|23051 |25508 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23051 [Bug 23051] Add ability to optionally renew fine accruing items when all fines on item are paid off https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25508 [Bug 25508] Confusing renewal message when paying accruing fine with RenewAccruingItemWhenPaid turned off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|14825 |27636 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14825 [Bug 14825] Accounts Rewrite Omnibus https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27636 [Bug 27636] Replace Koha::Account::pay with a simpler method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 119193 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119193&action=edit Bug 27927: Add Unit Tests Add a unit test to check that 'FORGIVEN' credits do not prompt an auto-renewal with `RenewAccruingItemWhenPaid` enabled. Test plan 1/ Apply the test patch 2/ Run t/db_dependent/Koha/Account/Line.t and confirm it fails 3/ Apply subsequent patch 4/ Re-run the test and confirm it passes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118781|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 119194 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119194&action=edit Bug 27927: Prevent renewal on lost forgive The `RenewAccruingItemWhenPaid` preference should only renew upon payment (and writeoff) and not upon automatic forgival triggered by `WhenLostForgiveFine`. Test plan 1/ Enable `WhenLostForgiveFine` and `RenewAccruingItemWhenPaid` 2/ Checkout an item and backdate it's due date 3/ Run longeroverdue.pl to mark the item as lost and create the fine 4/ Confirm that the item is not renewed as part of the process 5/ Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |24300 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24300 [Bug 24300] Add a 'payout amount' option to accounts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|27636 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27636 [Bug 27636] Replace Koha::Account::pay with a simpler method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- The behavior is all good, but I get a test failure: root@kohadevbox:koha(master)$ prove t/db_dependent/Koha/Account/Line.t t/db_dependent/Koha/Account/Line.t .. 7/14 # Looks like you planned 6 tests but ran 3. t/db_dependent/Koha/Account/Line.t .. 9/14 # Failed test 'checkout() tests' # at t/db_dependent/Koha/Account/Line.t line 643. Can't call method "checkout" on an undefined value at t/db_dependent/Koha/Account/Line.t line 635. # Looks like your test exited with 255 just after 9. t/db_dependent/Koha/Account/Line.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 6/14 subtests Test Summary Report ------------------- t/db_dependent/Koha/Account/Line.t (Wstat: 65280 Tests: 9 Failed: 1) Failed test: 9 Non-zero exit status: 255 Parse errors: Bad plan. You planned 14 tests but ran 9. Files=1, Tests=9, 5 wallclock secs ( 0.02 usr 0.01 sys + 3.13 cusr 0.59 csys = 3.75 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm really struggling to get this test to fail.. how are you running it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Going back through this, the test passes if FinesMode is set to Don't Calculate, but fails if FinesMode is set to Calculate and Charge. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119193|0 |1 is obsolete| | --- Comment #9 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 119235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119235&action=edit Bug 27927: Add Unit Tests Add a unit test to check that 'FORGIVEN' credits do not prompt an auto-renewal with `RenewAccruingItemWhenPaid` enabled. Test plan 1/ Apply the test patch 2/ Run t/db_dependent/Koha/Account/Line.t and confirm it fails 3/ Apply subsequent patch 4/ Re-run the test and confirm it passes Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119194|0 |1 is obsolete| | --- Comment #10 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 119236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119236&action=edit Bug 27927: Prevent renewal on lost forgive The `RenewAccruingItemWhenPaid` preference should only renew upon payment (and writeoff) and not upon automatic forgival triggered by `WhenLostForgiveFine`. Test plan 1/ Enable `WhenLostForgiveFine` and `RenewAccruingItemWhenPaid` 2/ Checkout an item and backdate it's due date 3/ Run longeroverdue.pl to mark the item as lost and create the fine 4/ Confirm that the item is not renewed as part of the process 5/ Signoff Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #11 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Signed off because I get that same test failure with FinesMode on without these patches. Filing a new bug for that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #12 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Filed bug 28097 for that test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Aha, thanks Andrew.. I hadn't thought about changing FinesMode having been changed in the background... certainly a bug, the tests should lock the preference to ensure they pass regardless. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Nick Clemens <nick@bywatersolutions.com> 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=27927 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119235|0 |1 is obsolete| | --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119676 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119676&action=edit Bug 27927: Add Unit Tests Add a unit test to check that 'FORGIVEN' credits do not prompt an auto-renewal with `RenewAccruingItemWhenPaid` enabled. Test plan 1/ Apply the test patch 2/ Run t/db_dependent/Koha/Account/Line.t and confirm it fails 3/ Apply subsequent patch 4/ Re-run the test and confirm it passes Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119236|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119677 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119677&action=edit Bug 27927: Prevent renewal on lost forgive The `RenewAccruingItemWhenPaid` preference should only renew upon payment (and writeoff) and not upon automatic forgival triggered by `WhenLostForgiveFine`. Test plan 1/ Enable `WhenLostForgiveFine` and `RenewAccruingItemWhenPaid` 2/ Checkout an item and backdate it's due date 3/ Run longeroverdue.pl to mark the item as lost and create the fine 4/ Confirm that the item is not renewed as part of the process 5/ Signoff Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.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=27927 --- Comment #16 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|21.05.00 |21.05.00,20.11.05 released in| | Status|Pushed to master |Pushed to stable --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Bug 27927 depends on bug 25508, which changed state. Bug 25508 Summary: Confusing renewal message when paying accruing fine with RenewAccruingItemWhenPaid turned off https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25508 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |victor@tuxayo.net Resolution|--- |FIXED --- Comment #19 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Missing dependencies for 19.11.x, it shouldn't be affected, no backport. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27927 Andrew Isherwood <bugzilla@warmlight.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|bugzilla@warmlight.co.uk | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org