[Bug 30393] New: datatables wrapper should handle searching for % and _
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Bug ID: 30393 Summary: datatables wrapper should handle searching for % and _ Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org This characters have special meanings in LIKE queries in MariaDB/MySQL and should be escaped correctly. [1] [1] https://dev.mysql.com/doc/refman/8.0/en/string-literals.html -- 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=30393 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30055 -- 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=30393 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30055 | Blocks| |30055 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30055 [Bug 30055] Rewrite some of the patron searches to make them use the REST API routes -- 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=30393 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=30063 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132544&action=edit Bug 30393: Make datatables wrapper handle searching for % and _ This patch makes searching for '%' and '_' work by escaping those symbols in the query before sending them to the API. To test: 1. Go to the cities page 2. Add two cities: - 'Cordoba %' - 'Buenos Aires _' 3. Use the column search on the name, alternating _ and % as the query => FAIL: Weird behavior 4. Apply this patch and reload 5. Repeat 3 => SUCCESS: Filtering works correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Tomás Cohen Arazi <tomascohen@gmail.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=30393 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132544|0 |1 is obsolete| | --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132551 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132551&action=edit Bug 30393: Make datatables wrapper handle searching for %, _, \ This patch makes searching for '%','_' and '\' work by escaping those symbols in the query before sending them to the API. To test: 1. Go to the cities page 2. Add two cities: - 'Cordoba %' - 'Buenos Aires _' - 'London \' 3. Use the column search on the name, alternating _, \ and % as the query => FAIL: Weird behavior 4. Apply this patch and reload 5. Repeat 3 => SUCCESS: Filtering works correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|datatables wrapper should |datatables wrapper should |handle searching for % and |handle searching for %, _ |_ |and \ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Séverine Queune <severine.queune@bulac.fr> 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=30393 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132551|0 |1 is obsolete| | --- Comment #3 from Séverine Queune <severine.queune@bulac.fr> --- Created attachment 132553 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132553&action=edit Bug 30393: Make datatables wrapper handle searching for %, _, \ This patch makes searching for '%','_' and '\' work by escaping those symbols in the query before sending them to the API. To test: 1. Go to the cities page 2. Add two cities: - 'Cordoba %' - 'Buenos Aires _' - 'London \' 3. Use the column search on the name, alternating _, \ and % as the query => FAIL: Weird behavior 4. Apply this patch and reload 5. Repeat 3 => SUCCESS: Filtering works correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine Queune <severine.queune@bulac.fr> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Séverine Queune <severine.queune@bulac.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |severine.queune@bulac.fr --- Comment #4 from Séverine Queune <severine.queune@bulac.fr> --- Works nice, this is an happy sign-off ! :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |30394 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30394 [Bug 30394] Add 'draw' handling to the datatables wrapper and REST API -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 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=30393 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132553|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 132561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132561&action=edit Bug 30393: Make datatables wrapper handle searching for %, _, \ This patch makes searching for '%','_' and '\' work by escaping those symbols in the query before sending them to the API. To test: 1. Go to the cities page 2. Add two cities: - 'Cordoba %' - 'Buenos Aires _' - 'London \' 3. Use the column search on the name, alternating _, \ and % as the query => FAIL: Weird behavior 4. Apply this patch and reload 5. Repeat 3 => SUCCESS: Filtering works correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine Queune <severine.queune@bulac.fr> 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=30393 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #132561|0 |1 is obsolete| | --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 132597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132597&action=edit Bug 30393: Make datatables wrapper handle searching for %, _, \ This patch makes searching for '%','_' and '\' work by escaping those symbols in the query before sending them to the API. To test: 1. Go to the cities page 2. Add two cities: - 'Cordoba %' - 'Buenos Aires _' - 'London \' 3. Use the column search on the name, alternating _, \ and % as the query => FAIL: Weird behavior 4. Apply this patch and reload 5. Repeat 3 => SUCCESS: Filtering works correctly! 6. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Séverine Queune <severine.queune@bulac.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=30393 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Just adding another QA stamp as I was also working through testing this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 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=30393 --- Comment #8 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=30393 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.05 released in| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393 Lari Taskula <lari.taskula@hypernova.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31565 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565 [Bug 31565] Patron search filter by category code with special character returns no results -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org