[Bug 34941] New: Patron search to find patrons with hyphens when they haven't been added in the search
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 Bug ID: 34941 Summary: Patron search to find patrons with hyphens when they haven't been added in the search Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: wainuiwitikapark@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com e.g. The behaviour of Koha used to be that if you searched patrons for "Witika Park" it would return "Wainui Witika-Park". Now you have to specifically search "Witika-Park" for the patron to show up i.e. "Witika Park" does not return any results -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 wainuiwitikapark@catalyst.net.nz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |didier.gautheron@biblibre.c | |om --- Comment #1 from Didier Gautheron <didier.gautheron@biblibre.com> --- And searching for "le bon" doesn't work anymore too since moving to rest API for search. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |32772 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32772 [Bug 32772] Patron autocomplete should not use contains on all fields -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Hi Wainui, please try this change: diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js index 86792041afe..6bdee1f0723 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js +++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js @@ -555,7 +555,7 @@ function buildPatronSearchQuery(term, options) { let q = []; let leading_wildcard; let search_fields; - let patterns = term.split(/[\s,]+/).filter(function (s) { return s.length }); + let patterns = term.split(/[\s,-]+/).filter(function (s) { return s.length }); // Bail if no patterns if (patterns.length == 0) { -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Didier Gautheron from comment #1)
And searching for "le bon" doesn't work anymore too since moving to rest API for search.
Please provide more info. Splitting on spaces should work. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 --- Comment #4 from Didier Gautheron <didier.gautheron@biblibre.com> --- Hi, before if there's a composed name like "foo-bar" searching "foo-bar" or "foo bar" worked, now "foo bar" doesn't work. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Sorry, the diff on comment #2 won't address the problem. Didier, I think what you describe is exactly what Wainui described on comment 0. If you want to work you need to select "Search type: contains". I am not sure it is a regression since the move to the REST API, we already had this start with/contains options. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 --- Comment #6 from Didier Gautheron <didier.gautheron@biblibre.com> --- Hi, Yes it's fixed by using the new syspref DefaultPatronSearchMethod. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34941 Bug 34941 depends on bug 32772, which changed state. Bug 32772 Summary: Patron autocomplete should not use contains on all fields https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32772 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org