Bug 35756 - Wrong use of encodeURIComponent in patron-search.inc
Summary: Wrong use of encodeURIComponent in patron-search.inc
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks: 35329
  Show dependency treegraph
 
Reported: 2024-01-10 07:54 UTC by Jonathan Druart
Modified: 2024-02-02 16:21 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.09


Attachments
Bug 35756: Correctly serialize patron's data in patron search popup/modal (4.65 KB, patch)
2024-01-10 08:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 35756: Correctly serialize patron's data in patron search popup/modal (4.71 KB, patch)
2024-01-11 00:48 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 35756: Correctly serialize patron's data in patron search popup/modal (4.76 KB, patch)
2024-01-12 14:10 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-01-10 07:54:41 UTC
When a new patron is selected, the info message is showing "Patron %s is already in the list" or "Patron %s added". If the patron has space in their name, they will be substituted with %20
Comment 1 Jonathan Druart 2024-01-10 08:39:31 UTC
Created attachment 160732 [details] [review]
Bug 35756: Correctly serialize patron's data in patron search popup/modal

We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.
Comment 2 Lucas Gass 2024-01-11 00:48:06 UTC
Created attachment 160795 [details] [review]
Bug 35756: Correctly serialize patron's data in patron search popup/modal

We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 3 Kyle M Hall 2024-01-12 14:10:36 UTC
Created attachment 160966 [details] [review]
Bug 35756: Correctly serialize patron's data in patron search popup/modal

We are incorrectly using encodeURIComponent in patron-search.inc.
When a new patron is selected, the info message is showing "Patron %s is already in the list"
or "Patron %s added". If the patron has space in their name, they will be substituted with %20.

We are using JSON for select, we can reuse it for add.

Test plan:
Have a patron with spaces in their name
Add users to a fund
Notice that the name is correctly displayed.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-01-16 11:09:44 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 5 Fridolin Somers 2024-01-17 09:18:28 UTC
Pushed to 23.11.x for 23.11.02
Comment 6 Lucas Gass 2024-02-02 16:21:28 UTC
Backported to 23.05.x for upcoming 23.05.09