Bug 22206 - Add routes to enable suspension or resumption of holds
Summary: Add routes to enable suspension or resumption of holds
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: REST api (show other bugs)
Version: master
Hardware: All All
: P5 - low new feature (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Josef Moravec
URL: https://wiki.koha-community.org/wiki/...
Keywords:
: 19072 (view as bug list)
Depends on: 19816 20006 21478 22132
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-24 19:18 UTC by Tomás Cohen Arazi
Modified: 2019-05-29 07:23 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
This new feature adds a REST API that allows suspending a hold and resuming a suspended hold.
Version(s) released in:


Attachments
Bug 22206: OpenAPI spec (4.49 KB, patch)
2019-01-28 10:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22206: Unit tests (3.46 KB, patch)
2019-01-28 10:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22206: Add routes to suspend/resume holds (2.99 KB, patch)
2019-01-28 10:44 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22206: OpenAPI spec (4.55 KB, patch)
2019-02-13 11:05 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22206: Unit tests (3.53 KB, patch)
2019-02-13 11:05 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22206: Add routes to suspend/resume holds (3.05 KB, patch)
2019-02-13 11:05 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 22206: OpenAPI spec (4.55 KB, patch)
2019-02-21 17:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: Unit tests (3.53 KB, patch)
2019-02-21 17:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: Add routes to suspend/resume holds (3.05 KB, patch)
2019-02-21 17:15 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: (QA follow-up) Fix tests for hold suspension api (929 bytes, patch)
2019-02-21 17:16 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: (follow-up) Voted RFC changes (3.89 KB, patch)
2019-02-28 13:02 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 22206: OpenAPI spec (4.62 KB, patch)
2019-02-28 13:21 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: Unit tests (3.59 KB, patch)
2019-02-28 13:21 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: Add routes to suspend/resume holds (3.11 KB, patch)
2019-02-28 13:21 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: (QA follow-up) Fix tests for hold suspension api (992 bytes, patch)
2019-02-28 13:21 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 22206: (follow-up) Voted RFC changes (3.94 KB, patch)
2019-02-28 13:21 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2019-01-24 19:18:58 UTC

    
Comment 1 Tomás Cohen Arazi 2019-01-28 10:44:23 UTC
Created attachment 84473 [details] [review]
Bug 22206: OpenAPI spec
Comment 2 Tomás Cohen Arazi 2019-01-28 10:44:28 UTC
Created attachment 84474 [details] [review]
Bug 22206: Unit tests
Comment 3 Tomás Cohen Arazi 2019-01-28 10:44:32 UTC
Created attachment 84475 [details] [review]
Bug 22206: Add routes to suspend/resume holds

This patch introduces:

- POST   /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension

to suspend a hold or resume a suspended hold, respectively.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D
Comment 4 Martin Renvoize 2019-02-13 11:05:11 UTC
Created attachment 85056 [details] [review]
Bug 22206: OpenAPI spec

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2019-02-13 11:05:14 UTC
Created attachment 85057 [details] [review]
Bug 22206: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2019-02-13 11:05:17 UTC
Created attachment 85058 [details] [review]
Bug 22206: Add routes to suspend/resume holds

This patch introduces:

- POST   /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension

to suspend a hold or resume a suspended hold, respectively.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2019-02-13 11:06:07 UTC
Seems solid work to me.. tested and working, signing off.
Comment 8 Josef Moravec 2019-02-21 17:15:21 UTC
Created attachment 85468 [details] [review]
Bug 22206: OpenAPI spec

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 9 Josef Moravec 2019-02-21 17:15:54 UTC
Created attachment 85469 [details] [review]
Bug 22206: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Josef Moravec 2019-02-21 17:15:59 UTC
Created attachment 85470 [details] [review]
Bug 22206: Add routes to suspend/resume holds

This patch introduces:

- POST   /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension

to suspend a hold or resume a suspended hold, respectively.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Josef Moravec 2019-02-21 17:16:04 UTC
Created attachment 85471 [details] [review]
Bug 22206: (QA follow-up) Fix tests for hold suspension api

Test plan:

prove t/db_dependent/api/v1/holds.t
Comment 12 Josef Moravec 2019-02-21 17:23:30 UTC
Looks good, I think it is ready, but we should wait for voting on development meeting. So setting BLOCKED (was Passed QA)
Comment 13 Tomás Cohen Arazi 2019-02-28 13:02:17 UTC
Created attachment 85862 [details] [review]
Bug 22206: (follow-up) Voted RFC changes

This patch changes expiration_date for end_date as voted when the RFC
was approved.

It also adds a test for the Location header being added correctly when
suspending a hold (SWAGGER3.4.1)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 14 Josef Moravec 2019-02-28 13:21:33 UTC
Created attachment 85864 [details] [review]
Bug 22206: OpenAPI spec

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 15 Josef Moravec 2019-02-28 13:21:36 UTC
Created attachment 85865 [details] [review]
Bug 22206: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 16 Josef Moravec 2019-02-28 13:21:41 UTC
Created attachment 85866 [details] [review]
Bug 22206: Add routes to suspend/resume holds

This patch introduces:

- POST   /holds/{hold_id}/suspension { "expiration_date": "2019-01-30" }
- DELETE /holds/{hold_id}/suspension

to suspend a hold or resume a suspended hold, respectively.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/holds.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 17 Josef Moravec 2019-02-28 13:21:45 UTC
Created attachment 85867 [details] [review]
Bug 22206: (QA follow-up) Fix tests for hold suspension api

Test plan:

prove t/db_dependent/api/v1/holds.t

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 18 Josef Moravec 2019-02-28 13:21:48 UTC
Created attachment 85868 [details] [review]
Bug 22206: (follow-up) Voted RFC changes

This patch changes expiration_date for end_date as voted when the RFC
was approved.

It also adds a test for the Location header being added correctly when
suspending a hold (SWAGGER3.4.1)

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 19 Josef Moravec 2019-02-28 13:22:44 UTC
More testing is always fine, and I even forget to add my sign-off line last time, fixed now ;) 

Thanks for quick follow-up Tomas
Comment 20 Nick Clemens 2019-03-15 19:59:42 UTC
Awesome work all!

Pushed to master for 19.05
Comment 21 Martin Renvoize 2019-03-19 10:55:11 UTC
As per my policy of backporting new API routes, Pushed to 18.11.x for 18.11.04
Comment 22 Lucas Gass 2019-03-26 23:37:51 UTC
not backporting to 18.05.x
Comment 23 Josef Moravec 2019-04-01 12:50:17 UTC
*** Bug 19072 has been marked as a duplicate of this bug. ***