[Bug 32770] New: Patron search field groups no longer exist
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Bug ID: 32770 Summary: Patron search field groups no longer exist 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: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Prior to bug 30063 we had a number of options in the patron dropdown that were grouped fields. I.e. choosing 'Address' would search accross multiple address fields . These have been lost, with no way for libraries to recreate them. The mappings were: standard => C4::Context->preference('DefaultPatronSearchFields') || 'surname,firstname,othernames,cardnumber,userid', email => 'email,emailpro,B_email', borrowernumber => 'borrowernumber', phone => 'phone,phonepro,B_phone,altcontactphone,mobile', address => 'streetnumber,streettype,address,address2,city,state,zipcode,country', -- 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=32770 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=32770 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 145921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145921&action=edit Bug 32770: Restore patron search on all emails and phone numbers Prior to bug 30063 we had "Email" and "Phone" in the search field list that allowed a search on all email or phone attributes. This patch restores that (in an a bit ugly way, but cannot do easier). Test plan: Confirm that "Email" and "Phone" are displayed in the search field list when searching for patrons. Note that "Phone" was there already, but was only searching on the first "phone" attribute. Confirm that the search works as expected. Note for QA: I was not expecting the REST API to handle search on attributes with the DB column names, I think this is a bug. -- 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=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate Assignee|koha-bugs@lists.koha-commun |jonathan.druart+koha@gmail. |ity.org |com -- 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=32770 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.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=32770 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145921|0 |1 is obsolete| | --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 145928 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145928&action=edit Bug 32770: Restore patron search on all emails and phone numbers Prior to bug 30063 we had "Email" and "Phone" in the search field list that allowed a search on all email or phone attributes. This patch restores that (in an a bit ugly way, but cannot do easier). Test plan: Confirm that "Email" and "Phone" are displayed in the search field list when searching for patrons. Note that "Phone" was there already, but was only searching on the first "phone" attribute. Confirm that the search works as expected. Note for QA: I was not expecting the REST API to handle search on attributes with the DB column names, I think this is a bug. Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 145935 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145935&action=edit Bug 32770: [alternate] Restore patron search on all emails, phones, and addresses Prior to bug 30063 we had "Email", "Phone", and "Address" in the search field list that allowed a search on all email, phone, or address attributes. This patron restores these and makes sure the search box and the patron search filters use the same block to keep them consistent The fields are now labelled 'All emails', 'All phones', and 'Full address' to make it clear that they search multiple - including any single field in the DefaultPatronSearchFields will additionally add that to the dropdowns To test: 1 - define 'test@email.pro' as 'Secondary email' for a patron 2 - Search from 'Search patrons' address bar (visible at top of moremember.pl) 3 - Nothing is found using 'Standard' or 'Email fields' 4 - Apply patch 5 - Refresh page and repeat 6 - Nothing is found for standard, Patron is found for 'All emails' 7 - Define a unique value for patron in 'Address 2' 8 - Confirm 'Full address' search returns the patron 9 - Test with 'Secondary phone' and 'All phones' as well 10 - Repeat test from 'Patrons' module using the search on the left -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- The original patch did not include 'address' and did not address the search bar - I attached an alternate to cover these and make the combination of fields more clear to users -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145928|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.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=32770 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145935|0 |1 is obsolete| | --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 146331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146331&action=edit Bug 32770: [alternate] Restore patron search on all emails, phones, and addresses Prior to bug 30063 we had "Email", "Phone", and "Address" in the search field list that allowed a search on all email, phone, or address attributes. This patron restores these and makes sure the search box and the patron search filters use the same block to keep them consistent The fields are now labelled 'All emails', 'All phones', and 'Full address' to make it clear that they search multiple - including any single field in the DefaultPatronSearchFields will additionally add that to the dropdowns To test: 1 - define 'test@email.pro' as 'Secondary email' for a patron 2 - Search from 'Search patrons' address bar (visible at top of moremember.pl) 3 - Nothing is found using 'Standard' or 'Email fields' 4 - Apply patch 5 - Refresh page and repeat 6 - Nothing is found for standard, Patron is found for 'All emails' 7 - Define a unique value for patron in 'Address 2' 8 - Confirm 'Full address' search returns the patron 9 - Test with 'Secondary phone' and 'All phones' as well 10 - Repeat test from 'Patrons' module using the search on the left Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart+koha@gmail. |nick@bywatersolutions.com |com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146331|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 146711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146711&action=edit Bug 32770: Restore patron search on all emails, phones, and addresses Prior to bug 30063 we had "Email", "Phone", and "Address" in the search field list that allowed a search on all email, phone, or address attributes. This patron restores these and makes sure the search box and the patron search filters use the same block to keep them consistent The fields are now labelled 'All emails', 'All phones', and 'Full address' to make it clear that they search multiple - including any single field in the DefaultPatronSearchFields will additionally add that to the dropdowns To test: 1 - define 'test@email.pro' as 'Secondary email' for a patron 2 - Search from 'Search patrons' address bar (visible at top of moremember.pl) 3 - Nothing is found using 'Standard' or 'Email fields' 4 - Apply patch 5 - Refresh page and repeat 6 - Nothing is found for standard, Patron is found for 'All emails' 7 - Define a unique value for patron in 'Address 2' 8 - Confirm 'Full address' search returns the patron 9 - Test with 'Secondary phone' and 'All phones' as well 10 - Repeat test from 'Patrons' module using the search on the left Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 147147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147147&action=edit Bug 32770: Restore phone all_phone vs all_phones That was caught by Selenium tests t/db_dependent/selenium/patrons_search.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Keywords|additional_work_needed | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #8)
Created attachment 147147 [details] [review] Bug 32770: Restore phone
all_phone vs all_phones That was caught by Selenium tests t/db_dependent/selenium/patrons_search.t
Follow-up pushed, thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_22_11_candidate | CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.04 |23.05.00,22.11.04,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Many hands makes light work, thankyou everyone! Pushed to 22.11.x for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00,22.11.04,22.11.04 |23.05.00,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Doesn't apply cleanly in 22.05.x, no backport unless it can be rebased. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 147696 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147696&action=edit Bug 32770: [22.05.x] Restore patron search on all emails, phones, and addresses Prior to bug 30063 we had "Email", "Phone", and "Address" in the search field list that allowed a search on all email, phone, or address attributes. This patron restores these and makes sure the search box and the patron search filters use the same block to keep them consistent The fields are now labelled 'All emails', 'All phones', and 'Full address' to make it clear that they search multiple - including any single field in the DefaultPatronSearchFields will additionally add that to the dropdowns To test: 1 - define 'test@email.pro' as 'Secondary email' for a patron 2 - Search from 'Search patrons' address bar (visible at top of moremember.pl) 3 - Nothing is found using 'Standard' or 'Email fields' 4 - Apply patch 5 - Refresh page and repeat 6 - Nothing is found for standard, Patron is found for 'All emails' 7 - Define a unique value for patron in 'Address 2' 8 - Confirm 'Full address' search returns the patron 9 - Test with 'Secondary phone' and 'All phones' as well 10 - Repeat test from 'Patrons' module using the search on the left Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Bug 32770: Restore phone all_phone vs all_phones That was caught by Selenium tests t/db_dependent/selenium/patrons_search.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.05.00,22.11.04 |23.05.00,22.11.04,22.05.11 released in| | --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for upcoming 22.05.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |arthur.suzuki@biblibre.com --- Comment #15 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- depends on 30063, can't backport to 21.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #16 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Lucas Gass from comment #14)
Backported to 22.05.x for upcoming 22.05.11
selenium/patrons_search.t is failing, you should not ignore CI failures! It can be recreated easily, if you empty DefaultPatronSearchFields and search for patrons, you get a 500 [2023/11/29 10:14:36] [ERROR] GET /api/v1/patrons: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.middle_name' in 'where clause' at /usr/share/perl5/Data/Page.pm line 49>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #16)
(In reply to Lucas Gass from comment #14)
Backported to 22.05.x for upcoming 22.05.11
selenium/patrons_search.t is failing, you should not ignore CI failures!
It can be recreated easily, if you empty DefaultPatronSearchFields and search for patrons, you get a 500
[2023/11/29 10:14:36] [ERROR] GET /api/v1/patrons: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.middle_name' in 'where clause' at /usr/share/perl5/Data/Page.pm line 49>> Koha::REST::Plugin::Exceptions::__ANON__ /kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73)
Do we open a new bug for this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32770 --- Comment #18 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- what's better for you. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org