https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383
--- Comment #47 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 209580 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209580&action=edit Bug 42383: (QA follow-up) Allow forgiving fees when cancelling a hold on check-in With 'Forgive fees for manually expired holds' checked, cancelling a waiting hold from the check-in page did nothing and the hold modal kept coming back. The page sends forgive_hold_fees to POST /checkins/{checkin_id}/hold_cancellation, but the request body schema did not include it and has additionalProperties: false, so the request was rejected with a 400. The error was swallowed by the store, the check-in stayed pending and its modal was shown again. This patch: - Adds forgive_hold_fees to the hold_cancellation body schema. The controller already handled it, including the updatecharges.writeoff permission check. - Makes the check-in store report a failed hold, transfer or recall action in the page error box, so a rejected action is no longer silently retried. Test plan: 1. Set ExpireReservesMaxPickUpDelayCharge to 5 2. Place a hold and check the item in to set it waiting 3. Set the hold's expiration date in the past: $ ktd --dbshell k> UPDATE reserves SET expirationdate = '2026-01-01' WHERE reserve_id = X; 4. On the check-in page, open the settings and check 'Forgive fees for manually expired holds' 5. Check the item in, click 'Cancel hold', then 'Cancel hold' in the cancellation pop-up => FAIL: The 'Hold found (item is already waiting)' modal comes back and the hold is not cancelled 6. Apply this patch, rebuild the API bundle and the JS and restart: $ ktd --shell k$ yarn api:bundle k$ yarn build k$ restart_all 7. Repeat steps 4 and 5 => SUCCESS: The hold is cancelled, the modal closes and the patron is not charged the expired hold fee 8. Run: k$ prove t/db_dependent/api/v1/checkins.t xt/api.t => SUCCESS: Tests pass! 9. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Brendan Lawlor <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
