[Bug 44341] New: An expired waiting hold is charged ExpireReservesMaxPickUpDelayCharge even when the patron asked to cancel it
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44341 Bug ID: 44341 Summary: An expired waiting hold is charged ExpireReservesMaxPickUpDelayCharge even when the patron asked to cancel it Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Target Milestone: --- A patron can ask to cancel a waiting hold from the OPAC (the hold cancellation request flow). Staff see the request on "Holds awaiting pickup" > "Holds with cancellation requests", and cancelling it there charges nothing. If staff do not get to the request before the hold's pickup delay runs out, CancelExpiredReserves (misc/cronjobs/holds/cancel_expired_holds.pl) cancels the hold and charges the patron the "expired hold" fee (ExpireReservesMaxPickUpDelayCharge / the expire_reserves_charge rule) as if they had simply not come. C4::Reserves::CancelExpiredReserves sets charge_cancel_fee for every waiting hold and never looks at $hold->cancellation_requested. So the patron who did what the library asked (said they no longer want it) pays a fee that the patron who asked on a day when staff were quicker does not. To reproduce (main 186bbe7; the new subtest does the same steps): 1. ExpireReservesMaxPickUpDelay = Allow, ExpireReservesMaxPickUpDelayCharge = 5 (or an expire_reserves_charge rule). 2. Place a hold, check the item in so it is waiting, and as the patron request cancellation in the OPAC. 3. Let the hold expire (or set its expirationdate in the past) and run misc/cronjobs/holds/cancel_expired_holds.pl. 4. The hold is cancelled and the patron has a RESERVE_EXPIRED debit of 5. Expected: no expiry charge when a cancellation request was placed; a waiting hold with no request is still charged. The new subtest in t/db_dependent/Reserves/CancelExpiredReserves.t shows it: without the fix the patron with the request gets 1 RESERVE_EXPIRED line instead of 0. -- 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=44341 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212808&action=edit Bug 44341: Do not charge an expired hold the patron asked to cancel Bug 44341: Do not charge an expired hold the patron asked to cancel CancelExpiredReserves charged the expired hold fee (ExpireReservesMaxPickUpDelayCharge / expire_reserves_charge) for every waiting hold, also when the patron had placed a cancellation request that staff had not yet actioned. Cancelling the request from the staff interface charges nothing, so the fee depended only on how quickly staff got to the request. A waiting hold with a cancellation request is now cancelled without the charge. A waiting hold with no request is charged as before. Test plan: 1. Apply only the test file change and run prove t/db_dependent/Reserves/CancelExpiredReserves.t The new subtest "No expiry charge when the patron requested cancellation" fails: the patron with the request has 1 RESERVE_EXPIRED line, expected 0. 2. Apply the whole patch and run it again: it passes. 3. prove t/db_dependent/Holds/ExpireReservesAutoFill.t t/db_dependent/Koha/Hold.t still pass. 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=44341 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | Status|NEW |Needs Signoff -- 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