[Bug 22377] New: Lost fines may not be refunded if another patron has a writeoff for the same item
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Bug ID: 22377 Summary: Lost fines may not be refunded if another patron has a writeoff for the same item 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 Target Milestone: --- To recreate: 1 - Checkout an item to Patron A, backdate the due date and run fines to generate an overdue 2 - Return the item 3 - Checkout the item to Patron B, mark it lost and ensure a fine is generated 4 - In the DB set the date i=on the lost fine to yesterday 5 - Writeoff the fine for Patron A 6 - Return the item 7 - It is no longer lost, but the lost fine is not refunded -- 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=22377 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.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=22377 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Do you have the rule defined? It seems that it is not created on install. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #1)
Do you have the rule defined? It seems that it is not created on install.
Which rule? I believe the problem is in the code for _FixAccountForLostAndReturned my $accountlines = Koha::Account::Lines->search( { itemnumber => $itemnumber, accounttype => { -in => [ 'L', 'Rep', 'W' ] }, }, { order_by => { -desc => [ 'date', 'accountno' ] } } ); We order by date and accountno - so a more recent writeoff will be found insetad of the lost fine -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=22563 CC| |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=22377 --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Bug 22563 could be very helpful here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- On second thoughts.. why do we look for 'W' at all in that query?.. 'W' = Writeoff == Credit.. should we not be looking solely for the 'L' (and/or 'LR') debt line? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|tomascohen@gmail.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=22377 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm working on a test for this at the tip of my accounts branch over here: https://github.com/PTFS-Europe/koha/compare/accounts_all...PTFS-Europe:bug_2... Currently however I'm struggling to replicate the problem. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22563 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22563 [Bug 22563] Convert lost handling to use 'status' instead of multiple accounttypes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 87605 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87605&action=edit Bug 22377: Add test case -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Attached my attempt to write a test for this.. anyone is welcome to take over as I couldn't replicate the issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.renvoize@ptfs-europe |koha-bugs@lists.koha-commun |.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=22377 Christopher Brannon <cbrannon@cdalibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org --- Comment #8 from Christopher Brannon <cbrannon@cdalibrary.org> --- Would like to see this move forward. This is an active problem. -- 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=22377 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Test still applies and I still can't replicate the issue... Reducing severity for now until someone can come up with a failing test case. -- 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=22377 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- The tests are constructed correctly, however, the problematic code has changed. The search as I describe has been removed, it now looks for a status of undef or '!= returned' AND specifically for lost fines Additionally, a write-off no longer gets an itemnumber, so we can't accidentally get the wrong fines. Fixed by bug 22563 -- 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=22377 Bug 22377 depends on bug 22563, which changed state. Bug 22563 Summary: Convert lost handling to use 'status' instead of multiple accounttypes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22563 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org