Bug 19072 - REST API: Toggle suspend for /api/v1/holds
Summary: REST API: Toggle suspend for /api/v1/holds
Status: RESOLVED DUPLICATE of bug 22206
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lari Taskula
QA Contact:
URL:
Keywords:
Depends on: 18137
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-10 09:30 UTC by Lari Taskula
Modified: 2019-04-01 12:50 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19072: Toggle suspend for /api/v1/holds (3.41 KB, patch)
2017-08-10 09:33 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 19072: Toggle suspend for /api/v1/holds (3.69 KB, patch)
2017-08-10 10:21 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 19072: Toggle suspend for /api/v1/holds (3.58 KB, patch)
2017-08-10 10:52 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 19072: Toggle suspend for /api/v1/holds (3.57 KB, patch)
2017-08-10 11:01 UTC, Lari Taskula
Details | Diff | Splinter Review
Bug 19072: Toggle suspend for /api/v1/holds (3.89 KB, patch)
2017-08-10 11:03 UTC, Lari Taskula
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lari Taskula 2017-08-10 09:30:56 UTC
Toggle suspend is missing from /api/v1/holds.
Comment 1 Lari Taskula 2017-08-10 09:33:42 UTC Comment hidden (obsolete)
Comment 2 Lari Taskula 2017-08-10 10:21:20 UTC Comment hidden (obsolete)
Comment 3 Lari Taskula 2017-08-10 10:52:27 UTC Comment hidden (obsolete)
Comment 4 Lari Taskula 2017-08-10 11:01:30 UTC Comment hidden (obsolete)
Comment 5 Lari Taskula 2017-08-10 11:03:08 UTC
Created attachment 65796 [details] [review]
Bug 19072: Toggle suspend for /api/v1/holds

This patch adds ability to toggle suspend for a hold.

To test:
1. prove t/db_dependent/api/v1/holds.t
2. Send a PUT request to suspended hold with suspend_until parameter as null
3. Observe that hold is now resumed
Comment 6 Benjamin Rokseth 2017-09-05 13:41:33 UTC
The use of C4::Reserves::ToggleSuspend is a bit counter-intuitive here. If you send a PUT to /api/v1/holds/x with '{"suspend":false}' it would suspend hold if it was not already suspended.

I would rather respect the body request and suspend according to that, or you would have unpredictable results.
Comment 7 Josef Moravec 2019-04-01 12:50:17 UTC

*** This bug has been marked as a duplicate of bug 22206 ***