]> git.koha-community.org Git - koha.git/commit
Bug 27894: Adapt /holds/:hold_id/pickup_locations
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 11 Mar 2021 12:34:05 +0000 (09:34 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 7 Apr 2021 14:08:04 +0000 (16:08 +0200)
commitd8be3d5084bf6d74a40c162a6b6e221bbbfc86ae
treee7c23a01fd0fc2628b56de51fca1b229aeda72ed
parentf98c4cec8eeb058357666af9e356a1dc251c19af
Bug 27894: Adapt /holds/:hold_id/pickup_locations

This patch makes the controller for the route, return all valid pickup
locations (i.e. pickup_location => 1) when AllowHoldPolicyOverride is
set to 'Allow', but also adds a calculated attribute: 'needs_override'
so the consumer knows the specific pickup location needs an override
(and thus be able to provide visual feedback on a single run).

To test:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/holds.t
=> FAILURE: Tests fail, the change is not implemented
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Holds.pm
api/v1/swagger/definitions/library.json