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.
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>
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>
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>
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>
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>
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>
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x