[Koha-bugs] [Bug 15252] New: Patron search on start with does not work with several terms
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Nov 25 12:12:07 CET 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15252
Bug ID: 15252
Summary: Patron search on start with does not work with several
terms
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Patrons
Assignee: koha-bugs at lists.koha-community.org
Reporter: fridolin.somers at biblibre.com
QA Contact: testopia at bugs.koha-community.org
CC: gmcharlt at gmail.com, kyle.m.hall at gmail.com
When searching a patron, search type can be 'start with' and 'contain'.
If the search text contains a space (or a coma), this text is splitted into
several terms.
Actually, the search on 'start with' with several terms never returns a result.
It is because the search composes an "AND" SQL query on terms.
For example (I display only the surname part) :
search type = contain :
'jean paul' => surname like '%jean% AND %paul%'
search type = start with :
'jean paul' => surname like 'jean% AND paul%'
The query for 'start with' is impossible.
I propose, for search with start with, to not split terms :
jean paul => surname like 'jean paul%'
One can always use '*' to add more truncation :
jea* pau* => surname like 'jea% pau%'
This bug affects a lot surnames with several terms like 'LE GUELEC' or 'MAC
BETH'.
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list