]> git.koha-community.org Git - koha.git/commit
Bug 28254: Make PUT /holds/:hold_id/pickup_location honour x-koha-override
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 28 Apr 2021 17:56:33 +0000 (14:56 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 May 2021 12:22:08 +0000 (14:22 +0200)
commit01b936762569f09fe6f4bf4872c05406a1e66010
tree579de6c7f7ba9ea7b5926402a48cb5e69c2da032
parente3baa979cff8a5cf02ab620e56444430b7ea3e53
Bug 28254: Make PUT /holds/:hold_id/pickup_location honour x-koha-override

This patch adds a new parameter (x-koha-override header) to the route,
and makes the controller pass this information (override requested) when
the AllowHoldPolicyOverride syspref is set, to
Koha::Hold->set_pickup_location.

This way, under certain conditions, we can be sure the update wont'
fail.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Holds.pm
api/v1/swagger/paths/holds.json