Bugzilla – Attachment 152485 Details for
Bug 34067
Patron attributes search handles 'starts with'/contains incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34067: Correct patron attributes 'starts with' search
Bug-34067-Correct-patron-attributes-starts-with-se.patch (text/plain), 1.80 KB, created by
Nick Clemens (kidclamp)
on 2023-06-20 13:50:20 UTC
(
hide
)
Description:
Bug 34067: Correct patron attributes 'starts with' search
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-06-20 13:50:20 UTC
Size:
1.80 KB
patch
obsolete
>From 32bf92f78df6acd70ad357d0852913b9dc69a678 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 20 Jun 2023 13:45:32 +0000 >Subject: [PATCH] Bug 34067: Correct patron attributes 'starts with' search > >To test: >1 - Add a new searchable patron attribute type: > Koha->Adminsitration->Patron attribute types >2 - Edit a patron and add a value 'alphabeta' for the attribute >3 - Go to 'Patrons', cick the settings icon in search and confirm search type is 'starts with' >4 - Type 'alpha' in the search bar, enter >5 - No patron found, wrong >6 - Type 'beta' in search bar, enter >7 - Patron found, wrong >8 - Apply patch >9 - Search for 'alpha', it finds the patron! >10 - Search for 'beta', patron not found >11 - Change search type to 'contains' >12 - Search for 'beta' >13 - Patron found! >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index ae95dfa909..a2da55dec9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -332,7 +332,7 @@ > patterns.forEach(function(pattern,i){ > let sub_or = []; > sub_or.push({ >- "extended_attributes.value": { "like": "%" + pattern + (search_type == "contain" ? "%" : "" )}, >+ "extended_attributes.value": { "like": (search_type == "contain" ? "%" : "" ) + pattern + "%" }, > "extended_attributes.code": extended_attribute_types > }); > subquery_and.push(sub_or); >-- >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 34067
:
152485
|
152491