]> git.koha-community.org Git - koha.git/commit
Bug 34365: Add cancellation request flow to DELETE /holds
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 24 Jul 2023 19:08:50 +0000 (16:08 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 17 Aug 2023 19:23:17 +0000 (09:23 -1000)
commite4e145eb4ad61db989395e45dbe082c0df7feff4
treebace339abf1164263844ec8705d703f1d484116f
parentffe0f845688c2e76d11adc1613d1a969e27935ca
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit eb224540e223d71f1f494b94ce3442567a1c6664)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/REST/V1/Holds.pm