https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39419 --- Comment #52 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 206818 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206818&action=edit Bug 39419: (QA follow-up) Allow clearing patron_expiration_date via PATCH The Holds API edit method used '//' to fall back to the existing patron_expiration_date, so an explicit null in the request body was ignored and the date could not be cleared. This patch uses 'exists', consistent with expiration_date. It also fixes a stray comma and semi colons in the AddReserve POD and removes an unused patron_expiration_date variable in ModReserve. Test plan: 1. In KTD, create a hold: curl -s -u koha:koha -X POST http://localhost:8081/api/v1/holds \ -H "Content-Type: application/json" \ -d '{"biblio_id": 1, "patron_id": 20, "pickup_library_id": "CPL", "expiration_date": "2099-01-01", "patron_expiration_date": "2099-01-01"}' 2. Using the hold_id from the response, clear both dates: curl -s -u koha:koha -X PATCH http://localhost:8081/api/v1/holds/<hold_id> \ -H "Content-Type: application/json" \ -d '{"expiration_date": null, "patron_expiration_date": null}' 3. Note patron_expiration_date is still 2099-01-01 4. Apply patch and restart_all 5. Repeat steps 1 and 2 6. Note both expiration_date and patron_expiration_date are now null 7. Run: prove t/db_dependent/api/v1/holds.t t/db_dependent/Reserves.t Sponsored-by: CLAMS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.