https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44140 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 211925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211925&action=edit Bug 44140: Cancel the waiting holds with a cancellation request when the check-in is blocked The old check-in page cancelled the waiting holds for which the patron had requested cancellation before it tried to return the item, so a check-in refused by BlockReturnOfWithdrawnItems or BlockReturnOfLostItems still cancelled them. The Vue page only did it for the check-ins that went through, leaving the hold on the hold shelf for an item that is withdrawn or lost. POST /checkins now cancels them when the check-in is blocked too, and lists them in 'cancelled_holds' of the 403 response. The page says that the hold was cancelled, next to the NOT CHECKED IN alert. To test: 1. Set BlockReturnOfWithdrawnItems to "Block" 2. In Administration > Circulation and fines rules, under 'Default waiting hold cancellation policy', set 'Cancellation allowed' to 'Yes' for all patron categories and item types 3. Place a hold on the record of an item for a patron, check the item in and confirm the hold, so it is waiting 4. In the OPAC, as that patron, go to your account > Holds and click 'Request to cancel' 5. On the 'Items' tab of the record, set the 'Withdrawn status' of the item to 'Withdrawn' 6. Check in the item at Circulation > Check in 7. The check-in is refused, and an alert says that the hold waiting for the item was cancelled 8. The hold is gone from the record's holds 9. Run the tests: prove t/db_dependent/api/v1/checkins.t t/cypress/integration/Circulation/Checkin_spec.ts Co-Authored-By: Claude Sonnet 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.