[Bug 32520] New: Make patron autocomplete respect DefaultPatronSearchFields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Bug ID: 32520 Summary: Make patron autocomplete respect DefaultPatronSearchFields Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Currently the patron autocomplete functionality is hard coded to search against firstname, surname and cardnumber. We have a customer who understandably expected it to respect the DefaultPatronSearchFields preference and was confused when userid didn't work as a search term. We should really tie the autocomplete search fields to this preference as well. -- 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=32520 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144816 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144816&action=edit Bug 32520: Iterate search_fields This pretty much matches the iterators in koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc. Now we need to work out the best way to pass the DefaultPatronSearchFields preference into the search_fields variable.. Perhaps pass it as part of the options at function call time? -- 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=32520 --- Comment #2 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 144862 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144862&action=edit Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete This patch updates js_includes.inc to set a new global js variable `defaultPatronSearchFields` with the content of the corresponding system preference. We then update the patron_autocomplete function to use this new global variable and iterate in the same way as koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc. NOTE: This changes the behaviour of the autocomplete from always searching using contains on surname or firstname or starts with on cardnumber to searching using 'contains' on any of the fields listed in the DefaultPatronSearchFields system preference of defaulting to 'firstname,middle_name,surname,othernames,cardnumber,userid'. Test plan 1. Ensure autocomplete still works everywhere 2. Confirm the system preference fields are being used. -- 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=32520 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |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=32520 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144816|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=32520 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144862|0 |1 is obsolete| | --- Comment #3 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 144868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144868&action=edit Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete This patch updates js_includes.inc to set a new global js variable `defaultPatronSearchFields` with the content of the corresponding system preference. We then update the patron_autocomplete function to use this new global variable and iterate in the same way as koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc. NOTE: This changes the behaviour of the autocomplete from always searching using contains on surname or firstname or starts with on cardnumber to searching using 'contains' on any of the fields listed in the DefaultPatronSearchFields system preference of defaulting to 'firstname,middle_name,surname,othernames,cardnumber,userid'. Test plan 1. Ensure autocomplete still works everywhere 2. Confirm the system preference fields are being used. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Barbara Johnson <barbara.johnson@bedfordtx.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |barbara.johnson@bedfordtx.g | |ov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure if the change from 'starts with' to 'contains' will cause any issues, but this works as described now. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch 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=32520 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144868|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 144878 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144878&action=edit Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete This patch updates js_includes.inc to set a new global js variable `defaultPatronSearchFields` with the content of the corresponding system preference. We then update the patron_autocomplete function to use this new global variable and iterate in the same way as koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc. NOTE: This changes the behaviour of the autocomplete from always searching using contains on surname or firstname or starts with on cardnumber to searching using 'contains' on any of the fields listed in the DefaultPatronSearchFields system preference of defaulting to 'firstname,middle_name,surname,othernames,cardnumber,userid'. Test plan 1. Ensure autocomplete still works everywhere 2. Confirm the system preference fields are being used. Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 144879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144879&action=edit Bug 32520: Amend DefaultPatronSearchFields system preference description Tries to clarify that the preference is not only used for the search in the patrons module, but also in circulation. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Make patron autocomplete |Patron autocomplete should |respect |respect |DefaultPatronSearchFields |DefaultPatronSearchFields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 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=32520 --- 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=32520 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|23.05.00 |23.05.00,22.11.03 released in| | Status|Pushed to master |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32520 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |32772 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32772 [Bug 32772] Patron autocomplete should not use contains on all fields -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org