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
And searching for "le bon" doesn't work anymore too since moving to rest API for search.
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) {
(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.
Hi, before if there's a composed name like "foo-bar" searching "foo-bar" or "foo bar" worked, now "foo bar" doesn't work.
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.
Hi, Yes it's fixed by using the new syspref DefaultPatronSearchMethod.