Rigth now the `DELETE /holds/:holds` route does a straight-cancellation of the hold. It should be possible to trigger the hold cancellation request workflow so thrid-party systems can use it.
Created attachment 153855 [details] [review] Bug 34365: Unit tests
Created attachment 153856 [details] [review] Bug 34365: Add cancellation request flow to DELETE /holds This patch adds a new `x-koha-override` header to allow enforcing the cancellation request flow for waiting holds. If the hold is not waiting, the header has no effect. To test: 1. Apply the tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/holds.t => FAIL: The endpoint doesn't implement the required logic 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The endpoint behavior is changed! 5. Sign off :-D
Created attachment 153935 [details] [review] Bug 34365: Unit tests Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Created attachment 153936 [details] [review] Bug 34365: Add cancellation request flow to DELETE /holds This patch adds a new `x-koha-override` header to allow enforcing the cancellation request flow for waiting holds. If the hold is not waiting, the header has no effect. To test: 1. Apply the tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/holds.t => FAIL: The endpoint doesn't implement the required logic 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The endpoint behavior is changed! 5. Sign off :-D Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Created attachment 154154 [details] [review] Bug 34365: Unit tests Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 154155 [details] [review] Bug 34365: Add cancellation request flow to DELETE /holds This patch adds a new `x-koha-override` header to allow enforcing the cancellation request flow for waiting holds. If the hold is not waiting, the header has no effect. To test: 1. Apply the tests patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/holds.t => FAIL: The endpoint doesn't implement the required logic 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! The endpoint behavior is changed! 5. Sign off :-D Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.11. Nice work everyone, thanks!
Pushed to 23.05.x for 23.05.03
Nice work everyone! Pushed to 22.11.x for next release