[Bug 34067] New: Patron attributes search handles 'starts with'/contains incorrectly
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Bug ID: 34067 Summary: Patron attributes search handles 'starts with'/contains incorrectly 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 The search we currently form is: "extended_attributes.value": { "like": "%" + pattern + (search_type == "contain" ? "%" : "" )}, Which defaults to an 'ends with' search -- 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=34067 Nick Clemens <nick@bywatersolutions.com> 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 152485 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152485&action=edit Bug 34067: Correct patron attributes 'starts with' search To test: 1 - Add a new searchable patron attribute type: Koha->Adminsitration->Patron attribute types 2 - Edit a patron and add a value 'alphabeta' for the attribute 3 - Go to 'Patrons', cick the settings icon in search and confirm search type is 'starts with' 4 - Type 'alpha' in the search bar, enter 5 - No patron found, wrong 6 - Type 'beta' in search bar, enter 7 - Patron found, wrong 8 - Apply patch 9 - Search for 'alpha', it finds the patron! 10 - Search for 'beta', patron not found 11 - Change search type to 'contains' 12 - Search for 'beta' 13 - Patron found! -- 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=34067 Sam Lau <samalau@gmail.com> 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Sam Lau <samalau@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #152485|0 |1 is obsolete| | --- Comment #2 from Sam Lau <samalau@gmail.com> --- Created attachment 152491 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=152491&action=edit Bug 34067: Correct patron attributes 'starts with' search To test: 1 - Add a new searchable patron attribute type: Koha->Adminsitration->Patron attribute types 2 - Edit a patron and add a value 'alphabeta' for the attribute 3 - Go to 'Patrons', cick the settings icon in search and confirm search type is 'starts with' 4 - Type 'alpha' in the search bar, enter 5 - No patron found, wrong 6 - Type 'beta' in search bar, enter 7 - Patron found, wrong 8 - Apply patch 9 - Search for 'alpha', it finds the patron! 10 - Search for 'beta', patron not found 11 - Change search type to 'contains' 12 - Search for 'beta' 13 - Patron found! Signed-off-by: Sam Lau <samalau@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=34067 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Signed Off |Patch doesn't apply -- 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=34067 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=34067 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |In Discussion --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- This is solved in master by 34092 - that should either be backported, or we move this patch to a stables only queue and fix it here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34092 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m --- Comment #4 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I believe the plan is to push bug 34092 to 22.11.x, but we're waiting for it for first land on 23.05.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Pedro Amorim from comment #4)
I believe the plan is to push bug 34092 to 22.11.x, but we're waiting for it for first land on 23.05.x.
I'm going to close this as a duplicate then, thanks for the fix :-) *** This bug has been marked as a duplicate of bug 34092 *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Pedro Amorim from comment #4)
I believe the plan is to push bug 34092 to 22.11.x, but we're waiting for it for first land on 23.05.x.
I personally think we should extract the patron autocomplete (and or patron search) from staff-global and put it back into a specific js file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34067 Andreas Roussos <a.roussos@dataly.gr> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34256 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org