Bugzilla – Attachment 120308 Details for
Bug 27865
Hold pickup location dropdown on patron pages should respect hold fulfillment policies
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27865: Pass the x-koha-override header to PUT /holds/:hold_id from the patron's page
Bug-27865-Pass-the-x-koha-override-header-to-PUT-h.patch (text/plain), 1.95 KB, created by
Kyle M Hall (khall)
on 2021-04-29 10:50:40 UTC
(
hide
)
Description:
Bug 27865: Pass the x-koha-override header to PUT /holds/:hold_id from the patron's page
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-04-29 10:50:40 UTC
Size:
1.95 KB
patch
obsolete
>From 6c632d5ca732efd7064289fd35a17b333a6f10bd Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 8 Mar 2021 14:36:41 -0300 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index c38e4f6d03..e076fa5536 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -229,6 +229,7 @@ $(document).ready(function() { > method: "PUT", > url: api_url, > data: JSON.stringify({ "pickup_library_id": $(this).val() }), >+ headers: { "x-koha-override": "any" }, > success: function( data ){ holdsTable.api().ajax.reload(); }, > error: function( jqXHR, textStatus, errorThrown) { > alert('There was an error:'+textStatus+" "+errorThrown); >-- >2.24.3 (Apple Git-128)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 27865
:
117941
|
118119
|
120291
| 120308