[Bug 44310] New: Lost fees can be charged when setting an item as unlost
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44310 Bug ID: 44310 Summary: Lost fees can be charged when setting an item as unlost Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- To recreate: 1 - Setup a ClaimReturnedLostValue - you can use 'Missing' in KTD Set ClaimReturnedChargeFee to 'Dont' or 'Ask' 2 - Find an item and set/ensure the replacement price is set 3 - Set WhenLostChargeReplacementFee to 'Charge' 4 - Checkout the item to a patron 5 - Claim the item returned, set the lost status but don't charge 6 - Resolve the claim as 'Returned' but don't change the lost status 7 - Click the item barcode in the patrons checkouts to go to the items tab 8 - Set the lost status to 'Choose' (Not lost) and save 9 - Check the patron record - it says they have one claim but it doesn't show 10 - Check their accounting tab - they have been charged a lost fee -- 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=44310 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.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=44310 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212726&action=edit Bug 44310: Add Cypress tests The checked out item is claimed returned without a fee, and the claim is resolved without changing its lost status: the item is still checked out and lost. Setting it as not lost from the item details page must not charge the lost fees, while setting a lost status still does. To test: 1 - yarn cypress run --spec t/cypress/integration/Circulation/LostStatus_spec.ts => FAIL: 'does not charge the lost fees when setting the item as not lost' finds the LOST and PROCESSING charges 2 - Apply the next patch, restart_all 3 - Run the tests again => SUCCESS: Tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44310 --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 212727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212727&action=edit Bug 44310: Don't charge lost fees when setting an item as not lost catalogue/updateitem.pl called LostItem for any change of the lost status from the item details page, including setting the item as not lost. For a checked out item, LostItem charges the replacement and processing fees. ->store had already run the found trigger, which had no lost fee to refund yet, so the fees charged after it are never refunded: neither then, nor at checkin, as the item is no longer lost. An item can be checked out and lost without having been charged, for instance when it was claimed returned without a fee and the claim was resolved without changing the lost status. This patch only calls LostItem when a lost status is set, as the item editor does. Changing from one lost status to another still charges the fees, as before. To test: 1 - Set ClaimReturnedLostValue to 'Missing' Set ClaimReturnedChargeFee to "Don't charge" Set WhenLostChargeReplacementFee to 'Charge' 2 - Set a replacement price on an item and check it out to a patron 3 - On the patron's checkouts table, claim the item returned 4 - On the patron's Claims tab, resolve the claim as 'Returned by patron' and keep the current lost status (Missing) 5 - Click the item barcode in the checkouts table to go to the item details (Items tab) 6 - Set the lost status to 'Choose' and click 'Set status' 7 - Check the patron's Accounting tab => The patron was charged a lost fee (and a processing fee if one is set in the circulation rules) 8 - Apply this patch, restart_all 9 - Repeat 2-7 with another item => No lost fee was charged 10 - Repeat 2-5, set the lost status to 'Lost' and click 'Set status' => The lost fee is still charged 11 - yarn cypress run --spec t/cypress/integration/Circulation/LostStatus_spec.ts => SUCCESS: Tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44310 David Nind <david@davidnind.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=44310 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212726|0 |1 is obsolete| | Attachment #212727|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=44310 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 212734 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212734&action=edit Bug 44310: Add Cypress tests The checked out item is claimed returned without a fee, and the claim is resolved without changing its lost status: the item is still checked out and lost. Setting it as not lost from the item details page must not charge the lost fees, while setting a lost status still does. To test: 1 - yarn cypress run --spec t/cypress/integration/Circulation/LostStatus_spec.ts => FAIL: 'does not charge the lost fees when setting the item as not lost' finds the LOST and PROCESSING charges 2 - Apply the next patch, restart_all 3 - Run the tests again => SUCCESS: Tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44310 --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 212735 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212735&action=edit Bug 44310: Don't charge lost fees when setting an item as not lost catalogue/updateitem.pl called LostItem for any change of the lost status from the item details page, including setting the item as not lost. For a checked out item, LostItem charges the replacement and processing fees. ->store had already run the found trigger, which had no lost fee to refund yet, so the fees charged after it are never refunded: neither then, nor at checkin, as the item is no longer lost. An item can be checked out and lost without having been charged, for instance when it was claimed returned without a fee and the claim was resolved without changing the lost status. This patch only calls LostItem when a lost status is set, as the item editor does. Changing from one lost status to another still charges the fees, as before. To test: 1 - Set ClaimReturnedLostValue to 'Missing' Set ClaimReturnedChargeFee to "Don't charge" Set WhenLostChargeReplacementFee to 'Charge' 2 - Set a replacement price on an item and check it out to a patron 3 - On the patron's checkouts table, claim the item returned 4 - On the patron's Claims tab, resolve the claim as 'Returned by patron' and keep the current lost status (Missing) 5 - Click the item barcode in the checkouts table to go to the item details (Items tab) 6 - Set the lost status to 'Choose' and click 'Set status' 7 - Check the patron's Accounting tab => The patron was charged a lost fee (and a processing fee if one is set in the circulation rules) 8 - Apply this patch, restart_all 9 - Repeat 2-7 with another item => No lost fee was charged 10 - Repeat 2-5, set the lost status to 'Lost' and click 'Set status' => The lost fee is still charged 11 - yarn cypress run --spec t/cypress/integration/Circulation/LostStatus_spec.ts => SUCCESS: Tests pass Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org