]> git.koha-community.org Git - koha.git/commit
Bug 27865: Pass the x-koha-override header to PUT /holds/:hold_id from the patron...
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 8 Mar 2021 17:36:41 +0000 (14:36 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 4 May 2021 13:05:37 +0000 (15:05 +0200)
commitc18d683f995d6d0f7d2ca53284d346b239a97dee
tree4c27b73805318c1e2a6edc3aaff580cd382a7c12
parentf22a7e323949a720baadbea2315febe788d0fdca
Bug 27865: Pass the x-koha-override header to PUT /holds/:hold_id from the patron's page

This patch makes the AJAX call to update an existing hold, pass the
'x-koha-override' header with the value of 'any', so any pickup location
policy override that is needed, is applied.

As the override is taken into account only if AllowHoldPolicyOverride is
enabled, this in fact restores the previous behavior.

To test:
1. Have a patron with a hold
2. Have AllowHoldPolicyOverride set to 'yes'
3. Try changing the pickup location to an invalid one
=> FAIL: The options are the same as before 27205, yet the AJAX call
         fails because of invalid pickup location.
4. Apply this patch
5. Repeat 3
=> SUCCESS: The API call succeeds, and the hold is updated (it is
        actually refetch, so just verify it has the value you selected
6. Sign off :-D

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/js/holds.js