[Bug 28097] New: t/db_dependent/Koha/Account/Line.t test fails with FinesMode set to calculate
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Bug ID: 28097 Summary: t/db_dependent/Koha/Account/Line.t test fails with FinesMode set to calculate Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: - Confirm finesmode is set to do not calculate - prove t/db_dependent/Koha/Account/Line.t - it passes! - set FinesMode ot calculate and charge - prove t/db_dependent/Koha/Account/Line.t - it fails 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. # Failed test 'checkout() tests' # at t/db_dependent/Koha/Account/Line.t line 615. Can't call method "checkout" on an undefined value at t/db_dependent/Koha/Account/Line.t line 607. # 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.32 cusr 0.65 csys = 4.00 CPU) Result: FAIL -- 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=28097 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com CC| |martin.renvoize@ptfs-europe | |.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=28097 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This is a side effect of bug 8338. With finesMode set to 'production' and CalculateFinesOnReturn set to 'enabled' upon return we will first re-calculate the fine amount (in this case that would result in a '0' amount fine).. we then call '_FixOverduesOnReturn' which subsequently fines the '0' amount fine and deletes it on the assumption it's a backdated return which had resulted in an errant fine. I wonder if, rather than delete the original fine, we should void it which would give a more thorough audit trail (and fix this bug).. However, I think such a VOID would still appear on the patrons account in the OPAC and that was what I believe people wanted to avoid with bug 8338. The easy fix here is to adjust the test to mock the two preferences to ensure they are disabled for the test case. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 119275 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119275&action=edit Bug 28097: Mock finesModes to disable recalculation Since bug 8338 the recalcuated zero amount fine is subsequently removed in _FixOverduesOnReturn which causes this test to fail if finesMode is 'production' and 'CalculateFinesOnReturn' is enabled. Perhaps we should be 'VOID'ing fines rather than completely deleting them, but that's a question for another day. Test plan 1/ Enable finesMode in the staff client 2/ Run the test and watch it fail 3/ Apply the patch 4/ Run the test and watch it pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |8338 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8338 [Bug 8338] Add ability to remove fines with dropbox mode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=28097 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #119275|0 |1 is obsolete| | --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 119276 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=119276&action=edit Bug 28097: Mock finesModes to disable recalculation Since bug 8338 the recalcuated zero amount fine is subsequently removed in _FixOverduesOnReturn which causes this test to fail if finesMode is 'production' and 'CalculateFinesOnReturn' is enabled. Perhaps we should be 'VOID'ing fines rather than completely deleting them, but that's a question for another day. Test plan 1/ Enable finesMode in the staff client 2/ Run the test and watch it fail 3/ Apply the patch 4/ Run the test and watch it pass 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=28097 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Small fix, passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28097 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=28097 --- Comment #5 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=28097 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.05 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to master |Pushed to stable --- Comment #6 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=28097 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.05 |21.05.00,20.11.05,20.05.11 released in| | Status|Pushed to stable |Pushed to oldstable --- Comment #7 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=28097 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |victor@tuxayo.net Status|Pushed to oldstable |RESOLVED --- Comment #8 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org