[Bug 40876] New: DT - Exact search not applied on second attribute for column filters
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Bug ID: 40876 Summary: DT - Exact search not applied on second attribute for column filters Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff interface Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com If you select an option in a column filter, the "exact" behaviour will only apply to the first attribute mapped to this column eg. on the patron search we have "Libraries" mapped to library.name and library.library_id. If you select Centerville/CPL, the generate q parameter will be {name: CPL, id: {like: "%CPL%"}} -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Jonathan Druart <jonathan.druart@gmail.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=40876 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186910 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186910&action=edit Bug 40876: Apply 'exact' to all attributes when column filtering If you select an option in a column filter, the "exact" behaviour will only apply to the first attribute mapped to this column eg. on the patron search we have "Libraries" mapped to library.name and library.library_id. If you select Centerville/CPL, the generated q parameter will be {name: CPL, id: {like: "%CPL%"}} This is caused by: if (value.match(/^\^(.*)\$$/)) { value = value.replace(/^\^/, "").replace(/\$$/, ""); On the second parameter we have lost the ^$ markers Moving it out of the loop fixes the problem (and does not impact the other behaviours: we search the same value for all the attributes Test plan: Create a library with code=CPLL and use if for a patron Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl Click search Select "Centerville" in the "Libraries" column filter => Without this patch you get the patrons from CPL and CPLL => With this patch applied only patrons from CPL are listed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40565 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40565 [Bug 40565] Column filters on the item search do not work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186910|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186918&action=edit Bug 40876: Apply 'exact' to all attributes when column filtering If you select an option in a column filter, the "exact" behaviour will only apply to the first attribute mapped to this column eg. on the patron search we have "Libraries" mapped to library.name and library.library_id. If you select Centerville/CPL, the generated q parameter will be {name: CPL, id: {like: "%CPL%"}} This is caused by: if (value.match(/^\^(.*)\$$/)) { value = value.replace(/^\^/, "").replace(/\$$/, ""); On the second parameter we have lost the ^$ markers Moving it out of the loop fixes the problem (and does not impact the other behaviours: we search the same value for all the attributes Test plan: Create a library with code=CPLL and use if for a patron Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl Click search Select "Centerville" in the "Libraries" column filter => Without this patch you get the patrons from CPL and CPLL => With this patch applied only patrons from CPL are listed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186918|0 |1 is obsolete| | --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 186922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186922&action=edit Bug 40876: Apply 'exact' to all attributes when column filtering If you select an option in a column filter, the "exact" behaviour will only apply to the first attribute mapped to this column eg. on the patron search we have "Libraries" mapped to library.name and library.library_id. If you select Centerville/CPL, the generated q parameter will be {name: CPL, id: {like: "%CPL%"}} This is caused by: if (value.match(/^\^(.*)\$$/)) { value = value.replace(/^\^/, "").replace(/\$$/, ""); On the second parameter we have lost the ^$ markers Moving it out of the loop fixes the problem (and does not impact the other behaviours: we search the same value for all the attributes Test plan: Create a library with code=CPLL and use if for a patron Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl Click search Select "Centerville" in the "Libraries" column filter => Without this patch you get the patrons from CPL and CPLL => With this patch applied only patrons from CPL are listed Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Paul Derscheid <paul.derscheid@lmscloud.de> 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=40876 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186922|0 |1 is obsolete| | --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 186923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186923&action=edit Bug 40876: Apply 'exact' to all attributes when column filtering If you select an option in a column filter, the "exact" behaviour will only apply to the first attribute mapped to this column eg. on the patron search we have "Libraries" mapped to library.name and library.library_id. If you select Centerville/CPL, the generated q parameter will be {name: CPL, id: {like: "%CPL%"}} This is caused by: if (value.match(/^\^(.*)\$$/)) { value = value.replace(/^\^/, "").replace(/\$$/, ""); On the second parameter we have lost the ^$ markers Moving it out of the loop fixes the problem (and does not impact the other behaviours: we search the same value for all the attributes Test plan: Create a library with code=CPLL and use if for a patron Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl Click search Select "Centerville" in the "Libraries" column filter => Without this patch you get the patrons from CPL and CPLL => With this patch applied only patrons from CPL are listed Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de 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=40876 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work all! Pushed to main for 25.11.00! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |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=40876 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com Version(s)|25.11.00,25.05.04 |25.11.00,25.05.04,24.11.11 released in| | --- Comment #7 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 24.11.x for 24.11.11 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40876 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #8 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org