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> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
0992769f6e
commit
bcabb5d247
1 changed files with 2 additions and 2 deletions
|
@ -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 + '%' } }
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue