Bug 27898 - Make PUT /holds/:hold_id handle x-koha-override for pickup locations
Summary: Make PUT /holds/:hold_id handle x-koha-override for pickup locations
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: REST API (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 27797
Blocks: 27865 28254
  Show dependency treegraph
 
Reported: 2021-03-08 16:02 UTC by Tomás Cohen Arazi
Modified: 2021-05-11 12:05 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 27898: Unit tests (2.38 KB, patch)
2021-03-08 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27898: Make PUT /holds/:hold_id accept overrides (1.85 KB, patch)
2021-03-08 16:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 27898: Unit tests (2.44 KB, patch)
2021-03-08 17:37 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 27898: Make PUT /holds/:hold_id accept overrides (1.91 KB, patch)
2021-03-08 17:37 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 27898: Unit tests (2.50 KB, patch)
2021-04-28 12:19 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 27898: Make PUT /holds/:hold_id accept overrides (1.97 KB, patch)
2021-04-28 12:19 UTC, Nick Clemens
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 2021-03-08 16:02:38 UTC
We need this so the UI can use the PUT route effectively. This is a follow-up for bug 27797 and needed on its descendents tree.
Comment 1 Tomás Cohen Arazi 2021-03-08 16:09:33 UTC
Created attachment 117935 [details] [review]
Bug 27898: Unit tests

This patch adds unit tests for the PUT /holds/:hold_id route so it
accepts the x-koha-override header and is able to override pickup
location constraints.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Tomás Cohen Arazi 2021-03-08 16:09:37 UTC
Created attachment 117936 [details] [review]
Bug 27898: Make PUT /holds/:hold_id accept overrides

This patch makes the route handle overriding pickup locations by passing
the 'x-koha-override' header (set to 'any').

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail, because things cannot be overridden ATM.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Andrew Fuerste-Henry 2021-03-08 17:37:01 UTC
Created attachment 117939 [details] [review]
Bug 27898: Unit tests

This patch adds unit tests for the PUT /holds/:hold_id route so it
accepts the x-koha-override header and is able to override pickup
location constraints.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 4 Andrew Fuerste-Henry 2021-03-08 17:37:03 UTC
Created attachment 117940 [details] [review]
Bug 27898: Make PUT /holds/:hold_id accept overrides

This patch makes the route handle overriding pickup locations by passing
the 'x-koha-override' header (set to 'any').

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail, because things cannot be overridden ATM.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Comment 5 Nick Clemens 2021-04-28 12:19:32 UTC
Created attachment 120268 [details] [review]
Bug 27898: Unit tests

This patch adds unit tests for the PUT /holds/:hold_id route so it
accepts the x-koha-override header and is able to override pickup
location constraints.

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens 2021-04-28 12:19:37 UTC
Created attachment 120269 [details] [review]
Bug 27898: Make PUT /holds/:hold_id accept overrides

This patch makes the route handle overriding pickup locations by passing
the 'x-koha-override' header (set to 'any').

To test:
1. Apply the unit tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAIL: Tests fail, because things cannot be overridden ATM.
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

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

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-05-04 13:25:01 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-05-11 12:05:19 UTC
Enhancement not pushed to 20.11.x