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.