Bugzilla – Attachment 153448 Details for
Bug 34256
Patron search: search for borrowernumber starts with fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34256: Fix regression from 34092
Bug-34256-Fix-regression-from-34092.patch (text/plain), 1.94 KB, created by
Katrin Fischer
on 2023-07-14 09:09:18 UTC
(
hide
)
Description:
Bug 34256: Fix regression from 34092
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-14 09:09:18 UTC
Size:
1.94 KB
patch
obsolete
>From ce4e78df719843824c8e7e930d19c85f1a43f055 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 14 Jul 2023 08:37:27 +0000 >Subject: [PATCH] Bug 34256: Fix regression from 34092 > >It appears search_fields variable got lost somewhere in my own rebases. >search_fields variable was not being considered as it should, in the function. >I think this patch fixes it. > >This showed in the borrowernumer no longer being searchable: > >* Use search filters in patron search >* Set 'Search field' to borrowernumber >* Search for 19 (Henry) or 41 (koha) in sample data >* No results :( >* Apply patch >* Search leads to the patron record again > >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 74af1ad89a..0e16baf053 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -554,7 +554,7 @@ function buildPatronSearchQuery(term, options) { > let pattern_subquery_and = []; > patterns.forEach(function (pattern, i) { > let pattern_subquery_or = []; >- defaultPatronSearchFields.split(',').forEach(function (field, i) { >+ search_fields.split(',').forEach(function (field, i) { > pattern_subquery_or.push( > { ["me." + field]: { 'like': leading_wildcard + pattern + '%' } } > ); >@@ -573,7 +573,7 @@ function buildPatronSearchQuery(term, options) { > > // Add full search term for each search field > let term_subquery_or = []; >- defaultPatronSearchFields.split(',').forEach(function (field, i) { >+ search_fields.split(',').forEach(function (field, i) { > term_subquery_or.push( > { ["me." + field]: { 'like': leading_wildcard + term + '%' } } > ); >-- >2.30.2
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 34256
:
153441
| 153448