[Bug 30576] New: DefaultPatronSearchFields no longer takes effect
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Bug ID: 30576 Summary: DefaultPatronSearchFields no longer takes effect Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Searching from the header search for patrons in the staff client no longer takes notice of the DefaultPatronSearchFields preference... and 'Standard' search once on the member search page, also doesn't reflect the preference either. To replicate: 1) Remove a field or two from the preference, but ensure at least some fields are present 2) Submit a patron search 3) Note that the search appears to user the 'Standard' option in the search 4) Inspect the network traffic and note that the fields searched upon do not reflect the preference. -- 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=30576 --- Comment #1 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 133543 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133543&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) 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=30576 Martin Renvoize <martin.renvoize@ptfs-europe.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=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com, | |nick@bywatersolutions.com, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=30576 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=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21978 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21978 [Bug 21978] Add middle name field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Jonathan Druart <jonathan.druart+koha@gmail.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 watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Jonathan Druart <jonathan.druart+koha@gmail.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=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133543|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 133555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133555&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) Signoff 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=30576 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=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.renvoize@ptfs-europe |jonathan.druart+koha@gmail. |.com |com Status|Passed QA |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart+koha@gmail. |martin.renvoize@ptfs-europe |com |.com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- t/db_dependent/selenium/patrons_search.t should pass after this patch. We are fixing a bug but introducing a regression. Double check the syspref's description. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Behaviour on 21.11.x: 1. DefaultPatronSearchFields has the default value (surname,firstname,othernames,cardnumber,userid) => standard will search "standard" (retrieved from the pref in the pm) 2. DefaultPatronSearchFields=surname,initials,borrowernotes => standard will search "standard" (retrieved from the pref in the pm) => 2 new options are added to the dropdown, "Initials" and "Circulation note" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133555|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 133684 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133684&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) Signoff 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=30576 --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 133685 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=133685&action=edit Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests The unit tests highlighted my original patch didn't cover the full preference description. We now replace the 'standard' option with the fields from the preference and we also add those fields as options to the field selection in advanced searches. This patch also adjusts the tests to test for that and reflects the expected changes to the number of options displayed in the select boxes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- As discussed, there is still an issue should someone add a bad field into the system preference.. but we decided that was out of scope for here. I'm also still stuck with one last test failure.. I have no idea how this patchset causes it.. hopefully it'll be something obvious for Jonathan to spot. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Ho.. that last failure is also on master.. I'll fix it on master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30608 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=30576 Jonathan Druart <jonathan.druart+koha@gmail.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=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #133684|0 |1 is obsolete| | Attachment #133685|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 134059 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134059&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) Signoff Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=30576 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 134060 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134060&action=edit Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests The unit tests highlighted my original patch didn't cover the full preference description. We now replace the 'standard' option with the fields from the preference and we also add those fields as options to the field selection in advanced searches. This patch also adjusts the tests to test for that and reflects the expected changes to the number of options displayed in the select boxes. 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=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30626 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Martin Renvoize from comment #8)
Ho.. that last failure is also on master.. I'll fix it on master
Fixed on bug 30626. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30626 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134059|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134084 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134084&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) Signoff Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134060|0 |1 is obsolete| | --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 134085 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134085&action=edit Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests The unit tests highlighted my original patch didn't cover the full preference description. We now replace the 'standard' option with the fields from the preference and we also add those fields as options to the field selection in advanced searches. This patch also adjusts the tests to test for that and reflects the expected changes to the number of options displayed in the select boxes. 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=30576 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Tiny rebase after setting dependencies to make sure these two are pushed in order :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 Nick Clemens <nick@bywatersolutions.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=30576 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #134084|0 |1 is obsolete| | Attachment #134085|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134211&action=edit Bug 30576: Use DefaultPatronSearchFields in patron search This patch corrects the handling of the 'Standard' search field in patron searches such that it accurately reflects the contents of the DefaultPatronSearchFields system preference and falls back to a hard coded list instead of always using the hard coded list. To test: 1) Empty the contents of DefaultPatronSearchFields systempreference 2) Perform a patron search from the header search 3) Inspect the patrons API request and note that we search on the default fallback fields of firstname, surname, othernames, cardnumber and userid (and some extended attributes which are historically hard coded). 4) Navigate to the memebers-home by clicking the 'Patrons' button from the main page 5) Perform another search using the filters on the left with 'Standard' selected. 6) Note the same list of search fields used as above in the patrons API request. 7) Update the DefaultPatronSearchFields systempreference adding one or more borrower fields in a comma delimited list. 8) Repeat steps 2 -> 6 but this time upon inspecting the API request you should find that only the fields in your DefaultPatronSearchFields list are searched (along with the hard coded extended attributes list). 9) Signoff Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=30576 --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 134212 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134212&action=edit Bug 30576: (follow-up) Corrections to behaviour to reflect unit tests The unit tests highlighted my original patch didn't cover the full preference description. We now replace the 'standard' option with the fields from the preference and we also add those fields as options to the field selection in advanced searches. This patch also adjusts the tests to test for that and reflects the expected changes to the number of options displayed in the select boxes. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=30576 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30639 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30639 [Bug 30639] Patron search does not split search terms -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30576 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=30576 --- Comment #17 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=30576 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=30576 Bug 30576 depends on bug 30626, which changed state. Bug 30626 Summary: DT REST API wrapper not building the filter query correctly https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30626 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org