[Bug 14871] New: Cannot search for patrons using second surname/firstname
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Bug ID: 14871 Summary: Cannot search for patrons using second surname/firstname Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com If a patron has more than one firstname/surname, the search failas on the checkout tab (and the autocomplete too) To reproduce: - Have a patron with two names and two surnames (for example: Tomas ito respectively Cohen Arazi) - Go to the patron search, search all forms and they work (first name, second name, both, and the same for surnames) => SUCCSES - Go to the Checkout tab, try the same => FAIL: it only works when searching for the first one -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 42786 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42786&action=edit Bug 14871: Extend the patrons search to search like %$term% (checkout tab) The patrons search used by the checkout tab and the autocomplete is not the same as the "search patrons" tab. The main difference is the "contain" vs "start with". So that if you have a patron with a patron with a surname "foo bar" and you search for "foo bar", the autocomplete and the result of a search by the checkout tab will search for "foo%" or "bar%" which won't return the patron you are search for. This patch replaces both autocomplete and checkout tab searches with a "contain" search. The search will be "%foo%" or "%bar%". Note that on big DB, this can cause unexpected results. Test plan: Create a patron with a surname "foo bar" Search for "bar" using the checkout tab. You should see the patron in the autocomplete result and the result page after submitting the search form. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 42799 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42799&action=edit [Signed-off] Bug 14871: Extend the patrons search to search like %$term% (checkout tab) The patrons search used by the checkout tab and the autocomplete is not the same as the "search patrons" tab. The main difference is the "contain" vs "start with". So that if you have a patron with a patron with a surname "foo bar" and you search for "foo bar", the autocomplete and the result of a search by the checkout tab will search for "foo%" or "bar%" which won't return the patron you are search for. This patch replaces both autocomplete and checkout tab searches with a "contain" search. The search will be "%foo%" or "%bar%". Note that on big DB, this can cause unexpected results. Test plan: Create a patron with a surname "foo bar" Search for "bar" using the checkout tab. You should see the patron in the autocomplete result and the result page after submitting the search form. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Attachment #42786|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42799|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 42938 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42938&action=edit [SIGNED OFF] Bug 14871: Extend the patrons search to search like %$term% (checkout tab) The patrons search used by the checkout tab and the autocomplete is not the same as the "search patrons" tab. The main difference is the "contain" vs "start with". So that if you have a patron with a patron with a surname "foo bar" and you search for "foo bar", the autocomplete and the result of a search by the checkout tab will search for "foo%" or "bar%" which won't return the patron you are search for. This patch replaces both autocomplete and checkout tab searches with a "contain" search. The search will be "%foo%" or "%bar%". Note that on big DB, this can cause unexpected results. Test plan: Create a patron with a surname "foo bar" Search for "bar" using the checkout tab. You should see the patron in the autocomplete result and the result page after submitting the search form. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42938|0 |1 is obsolete| | --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 43044 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43044&action=edit [PASSED QA] Bug 14871: Extend the patrons search to search like %$term% (checkout tab) The patrons search used by the checkout tab and the autocomplete is not the same as the "search patrons" tab. The main difference is the "contain" vs "start with". So that if you have a patron with a patron with a surname "foo bar" and you search for "foo bar", the autocomplete and the result of a search by the checkout tab will search for "foo%" or "bar%" which won't return the patron you are search for. This patch replaces both autocomplete and checkout tab searches with a "contain" search. The search will be "%foo%" or "%bar%". Note that on big DB, this can cause unexpected results. Test plan: Create a patron with a surname "foo bar" Search for "bar" using the checkout tab. You should see the patron in the autocomplete result and the result page after submitting the search form. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works as described, but I am concerned about the consequences for big library systems with lots of patron data. The search is very wide now, so it might get really hard to spot the one you have been actually looking for between those that just contain your typed in 3-4 letters. Are there better ways we could achieve this? like "p%" or like " p%" or like "-p%" maybe? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 --- Comment #6 from Marc Véron <veron@veron.ch> --- Maybe a Syspref in 'Patrons' near 'PatronsPerPage'? -- to enable / disable a 'wider' search for autocomplete -- and/or to define different flavors (start with / contain / ...) -- and/or to give even the possibility to define the fields to search -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I didn't want to suggest another pref... but it would solve the immediate problem of the behaviour change. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hbraum@nekls.org --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 15020 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This is only restoring previous behaviour actually. I'm not sure why we reverted it. But assuming that matching the first firstname/surname is a good relevance algorithm falls short I think. We should definitely consider moving this into fulltext search engines, because after all, using LIKEs is so inefficient... and those tools take care of this things so well... I'm not saying Zebra, we can put it on hold until ES is here, but we should thing ASAP of a better way of doing this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14871 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #11 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.20.x will be in 3.20.5 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org