[Bug 13822] New: Patron autocomplete search is severly limited
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Bug ID: 13822 Summary: Patron autocomplete search is severly limited Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "hall, k" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 36808 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36808&action=edit Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.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=13822 Tom Misilo <misilot@fit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |misilot@fit.edu -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- Tested for signing off, search behaviour is much better now! However, I propose to keep sorting, something like: my $order_by = 'surname, firstname'; my ($results) = Search( $term, $order_by, [ 10 ] ); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36808|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 37009 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37009&action=edit Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Done! (In reply to Marc Véron from comment #2)
Tested for signing off, search behaviour is much better now!
However, I propose to keep sorting, something like:
my $order_by = 'surname, firstname'; my ($results) = Search( $term, $order_by, [ 10 ] );
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #5 from Marc Véron <veron@veron.ch> --- Created attachment 37024 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37024&action=edit [Signed-off] Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work Folllowed 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37009|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Signed Off |In Discussion --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure about this change. With the patch applied a search for sch will bring up "Fischer" - so it does a 'contains' search. I think on a big system this will make the autocomplete harder to handle - it might bring up a lot of unrelated searches. There might be reasons to make the autocomplete more strict than the normal patron search, where you can pick your options. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #7 from Marc Véron <veron@veron.ch> --- I did a short test with following line: my ($results) = Search( $term, $order_by, [ 10 ],'','','start_with' ); This way, the search would be more restricted. To do a 'contains' search, the user can still use the wildcard character % 'Test' would give Testmann, Fritz Tester, Hans 'Hans' would give Meier, Hans Müller, Hansli '%est' would give Hatfield, Lester Testman, Fritz Tester, Hans West, Mae My proposition is to have the 'start_with' version and change the explanation from: Enter patron card number or partial name: to something like: Enter first digits/letters of patron card number or name. Prepend % for inline search. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm... the actual search matches the text, but the autocomplete is a different thing... I am not sure about this here. Would be good to test on a big database maybe. Maybe one of the bigger libraries could weigh in how they expect this to work? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 37173 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37173&action=edit Bug 13822 [QA Followup] - Make search do a 'starts with' search -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #10 from Marc Véron <veron@veron.ch> --- Created attachment 37177 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37177&action=edit [Signed-off] Bug 13822 [QA Followup] - Make search do a 'starts with' search Search uses now a 'starts with' search. Maxbe an other Sign-off is needed from a library with a huge number of patrons (see Katrins comment #8) Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37173|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37024|0 |1 is obsolete| | Attachment #37177|0 |1 is obsolete| | --- Comment #11 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 37328 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37328&action=edit Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |13894 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|13894 |13892 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Patch rewritten to take into account bug 13892. Completely new version will need a new sign off. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37328|0 |1 is obsolete| | --- Comment #13 from Marc Véron <veron@veron.ch> --- Created attachment 37331 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37331&action=edit Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works ok, I am seeing a small issue with and without the patch - filed bug 13957 for it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 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=13822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #37331|0 |1 is obsolete| | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 37522 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=37522&action=edit [PASSED QA] Bug 13822 - Patron autocomplete search is severly limited The script that returns data for the patron autocomplete does not use C4::Members::Search. Instead it uses bespoke code that does not behave like the traditional search and is very limited in how it can search. If, for example, I search for "Kyle Hall" in the standard search, I would get "Kyle Hall" back as a result. For the autocomplete search, I will not. This script should use C4::Members::Search to provide better searching and to keep the code base DRY. Test Plan: 1) Enable the system preference CircAutocompl 2) Create a user with the first name "Test" and the surname "User" 3) Perform a checkout autocomplete search for "Test User" 4) Note you do not get the user as a result 5) Apply this patch 6) Try different combinations of "Test" and "User" such as Test User User Test U Test Test U etc. 7) Note these searches now work Works as expected. Signed-off-by: Marc Véron <veron@veron.ch> 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=13822 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Kyle! tatus: Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13822 --- Comment #17 from Tom Misilo <misilot@fit.edu> --- Is there any way to get this included in 3.18? -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org