[Bug 35943] New: SQL reports groups/subgroups whose name contains regexp special characters break table filtering
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Bug ID: 35943 Summary: SQL reports groups/subgroups whose name contains regexp special characters break table filtering Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Reports Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org Groups and subgroups filtering uses regular expressions. The filter looks like "^" + name + "$" The problem is that the special characters in group/subgroup name are not properly escaped, which means that if a name contains "+", "*", or any other regexp special characters, filtering will probably fail. Another (minor) problem is that we use the name to filter instead of the code. So if we have two groups or two subgroups with the same name, it will show reports from both groups/subgroups. There is no reason to have groups/subgroups with the same name, but it is possible (whereas it's not possible to have different groups/subgroups with the same code), so this should be fixed too. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 161645 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161645&action=edit Bug 35943: Fix group/subgroup filtering of saved reports Use code instead of name for filtering and escape regexp special characters. This patch also disables datatables' smart filtering as it is not recommended to use with regexp filtering https://datatables.net/reference/api/search() Test plan: 1. Create a report in a group named "Foo + Bar" and in a subgroup named "Baz + Quux" 2. Create other reports in group "Foo + Bar" but in other subgroups, as well as in other groups. This is useful to see the effect of filtering 3. Go to the saved reports page and verify that navigating between tabs have the desired result. Same for the subgroup select -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Julian Maurice <julian.maurice@biblibre.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=35943 David Nind <david@davidnind.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=35943 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161645|0 |1 is obsolete| | --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 161793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=161793&action=edit Bug 35943: Fix group/subgroup filtering of saved reports Use code instead of name for filtering and escape regexp special characters. This patch also disables datatables' smart filtering as it is not recommended to use with regexp filtering https://datatables.net/reference/api/search() Test plan: 1. Create a report in a group named "Foo + Bar" and in a subgroup named "Baz + Quux" 2. Create other reports in group "Foo + Bar" but in other subgroups, as well as in other groups. This is useful to see the effect of filtering 3. Go to the saved reports page and verify that navigating between tabs have the desired result. Same for the subgroup select Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Kyle M Hall <kyle@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=35943 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #161793|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 163694 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=163694&action=edit Bug 35943: Fix group/subgroup filtering of saved reports Use code instead of name for filtering and escape regexp special characters. This patch also disables datatables' smart filtering as it is not recommended to use with regexp filtering https://datatables.net/reference/api/search() Test plan: 1. Create a report in a group named "Foo + Bar" and in a subgroup named "Baz + Quux" 2. Create other reports in group "Foo + Bar" but in other subgroups, as well as in other groups. This is useful to see the effect of filtering 3. Go to the saved reports page and verify that navigating between tabs have the desired result. Same for the subgroup select Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.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=35943 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.06 released in| | --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | CC| |lucas@bywatersolutions.com --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35943 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #7 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org