[Bug 33428] New: Should only search in searchable patron attributes if searching in standard fields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Bug ID: 33428 Summary: Should only search in searchable patron attributes if searching in standard fields 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: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Before patrons search using REST API, the search on patron attributes was only in standard fields. See Bug 18094 : Only search in searchable patron attributes if searching in standard fields -- 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=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolin Somers <fridolin.somers@biblibre.com> --- This creates strange behaviors for example when using search field surname and searching starts with one letter. Some results are matches on patron attributes. -- 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=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18094 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18094 [Bug 18094] Patron search filters are broken by searchable attributes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=3186 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=3186 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31868 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31867 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=32749 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 --- Comment #2 from Fridolin Somers <fridolin.somers@biblibre.com> --- Ich How can we tell the searching is standard fields ? https://git.koha-community.org/Koha-community/Koha/src/commit/f74a353097710c... Using search_fields == 'firstname,middle_name,surname,othernames,cardnumber,userid' ? Looks not very strong to me :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=33554 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.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=33428 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154352 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154352&action=edit Bug 33428: Parse search fields in buildPatronSearchQuery This patch moves the parsing of standard search_field into the buildPatronQuery subroutine and adds a check for 'standard' field before adding attributes to the search To test: 1 - Add a new attribute type and make it searchable 2 - Add a value to a patron 3 - Search for this value using 'Standard' fields, confirm you get the patron 4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD! 5 - Apply patch 6 - Repeat cardnumebr search, confirm patron not found - Yay! 7 - Search standard, confirm patron is found 8 - Add a new field to 'DefaultPatronSearchFields 9 - Confirm it appears in patron search dropdown 10 - Confirm a search of this field with the attribute value does not return the patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|fridolin.somers@biblibre.co |nick@bywatersolutions.com |m | CC| |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=33428 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Frido, I stole this, apologies, feel free to provide an alternate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Nick Clemens from comment #4)
Frido, I stole this, apologies, feel free to provide an alternate
Your welcome :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off 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=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154352|0 |1 is obsolete| | --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 154355 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154355&action=edit Bug 33428: Parse search fields in buildPatronSearchQuery This patch moves the parsing of standard search_field into the buildPatronQuery subroutine and adds a check for 'standard' field before adding attributes to the search To test: 1 - Add a new attribute type and make it searchable 2 - Add a value to a patron 3 - Search for this value using 'Standard' fields, confirm you get the patron 4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD! 5 - Apply patch 6 - Repeat cardnumebr search, confirm patron not found - Yay! 7 - Search standard, confirm patron is found 8 - Add a new field to 'DefaultPatronSearchFields 9 - Confirm it appears in patron search dropdown 10 - Confirm a search of this field with the attribute value does not return the patron Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Works great. I signed and removed unnecessary empty line addition in staff-global.js -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29822 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|18094 |29822 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18094 [Bug 18094] Patron search filters are broken by searchable attributes https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29822 [Bug 29822] Use table column selection modal for DefaultPatronSearchFields preference -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154355|0 |1 is obsolete| | --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154367 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154367&action=edit Bug 33428: Parse search fields in buildPatronSearchQuery This patch moves the parsing of standard search_field into the buildPatronQuery subroutine and adds a check for 'standard' field before adding attributes to the search To test: 1 - Add a new attribute type and make it searchable 2 - Add a value to a patron 3 - Search for this value using 'Standard' fields, confirm you get the patron 4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD! 5 - Apply patch 6 - Repeat cardnumebr search, confirm patron not found - Yay! 7 - Search standard, confirm patron is found 8 - Add a new field to 'DefaultPatronSearchFields 9 - Confirm it appears in patron search dropdown 10 - Confirm a search of this field with the attribute value does not return the patron Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154368 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154368&action=edit Bug 33428: Adjust Unit Tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154367|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 154528 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154528&action=edit Bug 33428: Parse search fields in buildPatronSearchQuery This patch moves the parsing of standard search_field into the buildPatronQuery subroutine and adds a check for 'standard' field before adding attributes to the search To test: 1 - Add a new attribute type and make it searchable 2 - Add a value to a patron 3 - Search for this value using 'Standard' fields, confirm you get the patron 4 - Search for the value using 'Cardnumber' field, confirm you get the patron - BAD! 5 - Apply patch 6 - Repeat cardnumebr search, confirm patron not found - Yay! 7 - Search standard, confirm patron is found 8 - Add a new field to 'DefaultPatronSearchFields 9 - Confirm it appears in patron search dropdown 10 - Confirm a search of this field with the attribute value does not return the patron Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <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=33428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #154368|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 154529 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154529&action=edit Bug 33428: Adjust Unit Tests Signed-off-by: Martin Renvoize <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=33428 --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 154530 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154530&action=edit Bug 33428: (QA follow-up) Fix escaping in a split call We'd missed an escape case in one of the calls to .split for the pipe delimited split operations. Signed-off-by: Martin Renvoize <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=33428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work, Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34519 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34519 [Bug 34519] Add a template plugin for ExtendedAttributeTypes to fetch searchable patron attributes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 154638 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=154638&action=edit Bug 33428 (follow-up): Default to searching 'standard' fields Before this patch set, a search for patrons from article requests or reserves would search the attributes by default. They were not considered 'standard' searches, however. This patch simply defaults to searching the 'standard' fields unless a value is passed To test: 1 - Apply other patches 2 - Have patrons with searchable attributes 3 - From a title, click the holds or artickle requests tab 4 - Search for the attribute values and confirm patrons are not returned 5 - Apply this patch 6 - Search again, patrons are now returned -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.11.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=33428 --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. 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=33428 --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 29822 not in 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=33428 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33428 Bug 33428 depends on bug 29822, which changed state. Bug 29822 Summary: Use table column selection modal for DefaultPatronSearchFields preference https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29822 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org