Bugzilla – Attachment 127188 Details for
Bug 29356
Search for pickup library when placing a hold should be truncated in both directions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29356: Pickup location dropdowns should perform 'contains' searches
Bug-29356-Pickup-location-dropdowns-should-perform.patch (text/plain), 3.95 KB, created by
Martin Renvoize (ashimema)
on 2021-11-01 17:29:35 UTC
(
hide
)
Description:
Bug 29356: Pickup location dropdowns should perform 'contains' searches
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-11-01 17:29:35 UTC
Size:
3.95 KB
patch
obsolete
>From afd17f874828db2246f2ab4d96edf791f783dc5d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 28 Oct 2021 15:32:04 -0300 >Subject: [PATCH] Bug 29356: Pickup location dropdowns should perform > 'contains' searches > >When placing a hold, the dropdowns for selecting a pickup library automatically right-truncate, so one can type "cen" and find Centerville. > >On the Libraries page in Admin, however, the search box both left- and >right-truncates, so one can type "en" and find Centerville. > >This patch makes the search perform 'contains' searches. > >To test: >1. Try placing a hold. Make sure your rules allow Centerville to be a > valid pickup location. >2. Search 'cen' >=> SUCCESS: Centerville shows >3. Search 'en >=> FAIL: Centerville doesn't show >4. Apply this patch and reload >5. Repeat 2 >=> SUCCESS: Works! >6. Repeat 3 >=> SUCCSS: Centerville shows! >7. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 6 +++--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 7e3d05402b..e44016cf97 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1260,7 +1260,7 @@ > data: function (params) { > var search_term = (params.term === undefined) ? '' : params.term; > var query = { >- "q": JSON.stringify({"name":{"-like":search_term+'%'}}), >+ "q": JSON.stringify({"name":{"-like":'%'+search_term+'%'}}), > "_order_by": "name", > "_per_page": -1 > }; >@@ -1322,7 +1322,7 @@ > data: function (params) { > var search_term = (params.term === undefined) ? '' : params.term; > var query = { >- "q": JSON.stringify({"name":{"-like":search_term+'%'}}), >+ "q": JSON.stringify({"name":{"-like":'%'+search_term+'%'}}), > "_order_by": "name", > "patron_id": patron_id, > "_per_page": -1 >@@ -1360,7 +1360,7 @@ > data: function (params) { > var search_term = (params.term === undefined) ? '' : params.term; > var query = { >- "q": JSON.stringify({"name":{"-like":search_term+'%'}}), >+ "q": JSON.stringify({"name":{"-like":'%'+search_term+'%'}}), > "_order_by": "name", > "patron_id": patron_id, > "_per_page": -1 >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 1f32a00f9f..a18b2641ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -249,7 +249,7 @@ $(document).ready(function() { > data: function (params) { > var search_term = (params.term === undefined) ? '' : params.term; > var query = { >- "q": JSON.stringify({"name":{"-like":search_term+'%'}}), >+ "q": JSON.stringify({"name":{"-like":'%'+search_term+'%'}}), > "_order_by": "name", > "_per_page": -1 > }; >-- >2.20.1
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 29356
:
127076
|
127077
| 127188