[Bug 44193] New: Paying (or writing off) a lost item charge marks the copy lost again after it has been returned
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44193 Bug ID: 44193 Summary: Paying (or writing off) a lost item charge marks the copy lost again after it has been returned Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When a LOST charge is fully paid, Koha::Account::Line::apply sets the item's itemlost to UpdateItemLostStatusWhenPaid (or UpdateItemLostStatusWhenWriteOff for a write-off). It never checks that the copy is still lost. A copy can be found while its charge stays on the patron's account: the "Lost item fee refund on return" policy set to "Leave lost item charge" for the replacement fee, or a return after NoRefundOnLostReturnedItemsAge days. Checking it in clears itemlost and the book goes back on the shelf. When the patron later pays the charge, the copy is set to lost again (e.g. "Lost and paid for"): it shows as lost in the staff interface and the OPAC (hidden there with hidelostitems) and cannot fill holds, while it is sitting on the shelf, and nothing on the screen says why. To reproduce: 1. Set UpdateItemLostStatusWhenPaid to a lost value, e.g. "Lost and paid for". 2. Circulation and fines rules, "Lost item fee refund on return policy": Refund lost item replacement fee = "Leave lost item charge". 3. Check an item out to a patron and mark it lost: a LOST charge is added. 4. Check the item in: it is no longer lost; the LOST charge is still outstanding. 5. Pay the LOST charge in full. 6. The item is lost again (itemlost = the value from step 1). Expected: a copy that is no longer lost keeps its status when the charge is paid or written off. Reproduced on main (6ff8078) with a db_dependent test (pay of a LOST debit whose item has itemlost = 0 sets it to 3). -- 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=44193 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212181 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212181&action=edit Bug 44193: Do not mark a found copy lost when its lost charge is paid Bug 44193: Do not mark a found copy lost when its lost charge is paid When a LOST charge was paid (or written off) in full, apply() set the item to UpdateItemLostStatusWhenPaid (or UpdateItemLostStatusWhenWriteOff) without checking that it was still lost. A copy returned while its charge was kept ("Leave lost item charge", or after NoRefundOnLostReturnedItemsAge) went back to lost when the patron paid, although it was on the shelf. The status is now only changed while the copy is still lost. Test plan: 1. prove t/db_dependent/Circulation.t The new subtest "Paying or writing off a lost charge does not mark a found copy lost again" fails without the patch (itemlost becomes 3 and 4). 2. In the staff interface: a. UpdateItemLostStatusWhenPaid = "Lost and paid for". b. Circulation and fines rules, Lost item fee refund on return policy: Refund lost item replacement fee = "Leave lost item charge". c. Check an item out, mark it lost (a LOST charge is added), check it in: the item is not lost, the charge is still outstanding. d. Pay the LOST charge in full. e. Without the patch the item is "Lost and paid for" again; with the patch it stays available. 3. A copy still lost when its charge is paid is still set to "Lost and paid for" (existing tests). Sponsored-by: Koha Solutions -- 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=44193 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- 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=44193 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Comma delimited| |Koha Solutions list of Sponsors| | Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44193 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212181|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44193 --- Comment #2 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 212429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212429&action=edit Bug 44193: Do not mark a found copy lost when its lost charge is paid When a LOST charge was paid (or written off) in full, apply() set the item to UpdateItemLostStatusWhenPaid (or UpdateItemLostStatusWhenWriteOff) without checking that it was still lost. A copy returned while its charge was kept ("Leave lost item charge", or after NoRefundOnLostReturnedItemsAge) went back to lost when the patron paid, although it was on the shelf. The status is now only changed while the copy is still lost. Test plan: 1. prove t/db_dependent/Circulation.t The new subtest "Paying or writing off a lost charge does not mark a found copy lost again" fails without the patch (itemlost becomes 3 and 4). 2. In the staff interface: a. UpdateItemLostStatusWhenPaid = "Lost and paid for". b. Circulation and fines rules, Lost item fee refund on return policy: Refund lost item replacement fee = "Leave lost item charge". c. Check an item out, mark it lost (a LOST charge is added), check it in: the item is not lost, the charge is still outstanding. d. Pay the LOST charge in full. e. Without the patch the item is "Lost and paid for" again; with the patch it stays available. 3. A copy still lost when its charge is paid is still set to "Lost and paid for" (existing tests). Sponsored-by: Koha Solutions Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org