[Bug 41783] New: Query parameters for suggestions filtering is not encoded
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 Bug ID: 41783 Summary: Query parameters for suggestions filtering is not encoded Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: maryse.simard@inlibro.com QA Contact: testopia@bugs.koha-community.org -- 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=41783 Maryse Simard <maryse.simard@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs 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=41783 --- Comment #1 from Maryse Simard <maryse.simard@inlibro.com> --- Created attachment 192576 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192576&action=edit Bug 41783: Encode query parameters for suggestions filtering When filtering by bibliographic information in the sidebar of the suggestions management page, the '%' contained in the query is not encoded. This can lead to errors if the search terms can be evaluated as an encoded character. Test plan: 1. Go to Acquisitions > Suggestions 2. Create a suggestion with a title like "200 recipes" 3. In "Filter by" > Bibliographic information, search for "200" 4. No results are shown in the table 5. Apply the patch 6. Search again (step 3). The suggestion should appear in the list. -- 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=41783 Maryse Simard <maryse.simard@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |maryse.simard@inlibro.com |ity.org | -- 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=41783 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=41783 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192576|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=41783 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 192578 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192578&action=edit Bug 41783: Encode query parameters for suggestions filtering When filtering by bibliographic information in the sidebar of the suggestions management page, the '%' contained in the query is not encoded. This can lead to errors if the search terms can be evaluated as an encoded character. Test plan: 1. Go to Acquisitions > Suggestions 2. Create a suggestion with a title like "200 recipes" 3. In "Filter by" > Bibliographic information, search for "200" 4. No results are shown in the table 5. Apply the patch 6. Search again (step 3). The suggestion should appear in the list. 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=41783 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial 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=41783 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192578|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=41783 --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 196500 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196500&action=edit Bug 41783: Encode query parameters for suggestions filtering When filtering by bibliographic information in the sidebar of the suggestions management page, the '%' contained in the query is not encoded. This can lead to errors if the search terms can be evaluated as an encoded character. Test plan: 1. Go to Acquisitions > Suggestions 2. Create a suggestion with a title like "200 recipes" 3. In "Filter by" > Bibliographic information, search for "200" 4. No results are shown in the table 5. Apply the patch 6. Search again (step 3). The suggestion should appear in the list. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 --- Comment #4 from Brendan Lawlor <blawlor@clamsnet.org> --- This works and makes sense that you have to encode stringified JSON in order for it to be url safe. I think the problem was actually with {} and : in the request url Before the patch the API request url started like: http://localhost:8081/api/v1/suggestions?q={%22me.STATUS%22:%22ASKED%22,%22archived%22:0}&... After the patch the : http://localhost:8081/api/v1/suggestions?q=%7B%22archived%22%3A0%2C%22me.STATUS%22%3A%22ASKED%22%7D&... The rest of the url starting with &_page= was the same before and after the patch Nice work. Passing QA! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes searching for release notes| |suggestions using the | |"Bibliographic information" | |filter on the acquisitions | |page in the staff interface | |(Acquisitions > | |Suggestions). | | | |Searching was not working | |as expected in some | |situations. For example, | |searching for a title of an | |existing suggestion did not | |return any results. CC| |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=41783 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- *** Bug 42272 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.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=41783 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|26.05.00 |26.05.00,25.11.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41783 --- Comment #7 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org