Summary: | Hold cancellation request workflow cannot be triggered on API | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | emily.lamancusa, fabriciomolina, fridolin.somers, jzairo, myranda, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34333 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.03,22.11.09
|
|
Circulation function: | |||
Attachments: |
Bug 34365: Unit tests
Bug 34365: Add cancellation request flow to DELETE /holds Bug 34365: Unit tests Bug 34365: Add cancellation request flow to DELETE /holds Bug 34365: Unit tests Bug 34365: Add cancellation request flow to DELETE /holds |
Description
Tomás Cohen Arazi (tcohen)
2023-07-24 18:02:19 UTC
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 |