[Bug 30639] New: Patron search does not find patrons if passed first and last name
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Bug ID: 30639 Summary: Patron search does not find patrons if passed first and last name Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Search for: "edna acosta" OR "henry acevedo" OR you favorite default patron No results! The query is search for both terms in each field: i.e. firstname LIKE 'edna acosta' -- 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=30639 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30063 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30063 [Bug 30063] Make the main patron search use the /patrons REST API route -- 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=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search does not find |Patron search does not |patrons if passed first and |split search terms |last name | Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com CC| |jonathan.druart+koha@gmail. | |com -- 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=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30626, 30643 Keywords| |rel_22_05_candidate Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30626 [Bug 30626] DT REST API wrapper not building the filter query correctly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30643 [Bug 30643] Useless query part generated by DT REST API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 134251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134251&action=edit Bug 30639: Split search terms for patron search If several terms are passed we should split them. Test plan: Search for "edna acosta" (without quotes) in the filters from the left side of the main patron search Do some regression tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- This is still not perfect for patron attributes. If you have: attribute 1 = xxx attribute 2 = yyy and you search for "xxx yyy", the patron won't be returned. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|30626, 30643 |30576 Status|Needs Signoff |ASSIGNED Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 [Bug 30576] DefaultPatronSearchFields no longer takes effect https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30626 [Bug 30626] DT REST API wrapper not building the filter query correctly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30643 [Bug 30643] Useless query part generated by DT REST API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30643 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30643 [Bug 30643] Useless query part generated by DT REST API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Bug 30639 depends on bug 30643, which changed state. Bug 30643 Summary: Useless query part generated by DT REST API wrapper https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30643 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |RESOLVED Resolution|--- |DUPLICATE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|30643 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30643 [Bug 30643] Useless query part generated by DT REST API wrapper -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30645 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30645 [Bug 30645] Patron search not building the query correctly for extended attributes if several terms passed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #2)
This is still not perfect for patron attributes. If you have: attribute 1 = xxx attribute 2 = yyy
and you search for "xxx yyy", the patron won't be returned.
Reported on bug 30645. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134251|0 |1 is obsolete| | --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134263 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134263&action=edit Bug 30639: Split search terms for patron search If several terms are passed we should split them. Test plan: Search for "edna acosta" (without quotes) in the filters from the left side of the main patron search Do some regression tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | CC| |m.de.rooy@rijksmuseum.nl Status|Signed Off |BLOCKED --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- # Pattern terms must be split $s->fill_form( { search_patron_filter => 'test patron' } ); $s->submit_form; $s->wait_for_ajax; is( $driver->find_element('//div[@id="'.$table_id.'_info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', $PatronsPerPage, 26, $total_number_of_patrons) ); Hmm I cant run this test. But Nick tested it. Just dont understand the 26 here. Reading the test I expect 25 ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Marcel de Rooy from comment #6)
# Pattern terms must be split $s->fill_form( { search_patron_filter => 'test patron' } ); $s->submit_form;
$s->wait_for_ajax; is( $driver->find_element('//div[@id="'.$table_id.'_info"]')->get_text, sprintf('Showing 1 to %s of %s entries (filtered from %s total entries)', $PatronsPerPage, 26, $total_number_of_patrons) );
Hmm I cant run this test. But Nick tested it. Just dont understand the 26 here. Reading the test I expect 25 ?
For most of the test we are filtering by library and so we get the 25 from 77 for my $i ( 1 .. 25 ) { 78 push @patrons, 79 $builder->build_object( But there is a 26th patron matching test_patron_* 97 push @patrons, 98 $builder->build_object( 99 { 100 class => 'Koha::Patrons', 101 value => { 102 surname => "test_patron_26", Which is from a different library. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134263|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 134709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134709&action=edit Bug 30639: Split search terms for patron search If several terms are passed we should split them. Test plan: Search for "edna acosta" (without quotes) in the filters from the left side of the main patron search Do some regression tests Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|30063 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30063 [Bug 30063] Make the main patron search use the /patrons REST API route -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org