Bug 32233 - Cannot add a guarantor when patron attributes have certain characters
Summary: Cannot add a guarantor when patron attributes have certain characters
Status: RESOLVED DUPLICATE of bug 32675
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-16 17:00 UTC by Lucas Gass
Modified: 2024-01-04 14:42 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2022-11-16 17:00:10 UTC
To recreate:

1. Setup a patron attribute 
2. Setup an authorized value category and link it to the new patron attribute
3. Make sure the new authorized value category has a code like 'Driver's License'.
4. Make sure that patron has been give that value in the patron attribute.
5. Now try to link a child account to that borrower. Nothing happens but you will see a console error like:

JSON.parse: unterminated string at line 1 column 892 of the JSON data
Comment 1 Katrin Fischer 2022-11-16 17:03:33 UTC
Hi Lucas, do you really mean code or one of the descriptions?
Comment 2 Lucas Gass 2022-11-16 17:27:31 UTC
(In reply to Katrin Fischer from comment #1)
> Hi Lucas, do you really mean code or one of the descriptions?

Katrin, sorry. I mean code.
Comment 3 Katrin Fischer 2022-11-16 17:38:09 UTC
Hm, then I am not opposed to fixing issues, but I'd also strongly encourage people not to do that. "Driver's license" is not a code, it's a description.

We train libraries to stick to alphanumeric, no spaces, no underscores, no special characters etc. because it also tends to create problems with search (locations, collections, etc.)
Comment 4 Marie-Luce Laflamme 2022-12-22 22:16:14 UTC
I've noticed the same issue when the selected guarantor account includes a special character. For example, a simple apostrophe in the guarantor account can block the selection.

Test plan
1. Find two patrons:
  -patron 1 = guarantee
  -patron 2 = guarantor
2. In the patron 2 account, add a special character in the address field (e.g. L'Aqueduc) and save
3. Return to the patron 1 and add a guarantor
4. Search for the patron 2
5. Click on "Select"
--> Nothing happens
6. Edit the patron 2
7. Remove the special character and save
8. Try to add the guarantor again
--> This time, Koha will link these accounts as it should do normally.
Comment 5 Lucas Gass 2023-01-19 17:07:36 UTC
(In reply to Marie-Luce Laflamme from comment #4)
> I've noticed the same issue when the selected guarantor account includes a
> special character. For example, a simple apostrophe in the guarantor account
> can block the selection.
> 
> Test plan
> 1. Find two patrons:
>   -patron 1 = guarantee
>   -patron 2 = guarantor
> 2. In the patron 2 account, add a special character in the address field
> (e.g. L'Aqueduc) and save
> 3. Return to the patron 1 and add a guarantor
> 4. Search for the patron 2
> 5. Click on "Select"
> --> Nothing happens
> 6. Edit the patron 2
> 7. Remove the special character and save
> 8. Try to add the guarantor again
> --> This time, Koha will link these accounts as it should do normally.

Marie-Luce, that sounds like it is being handled in Bug 32675.
Comment 6 Jonathan Druart 2024-01-04 14:42:45 UTC

*** This bug has been marked as a duplicate of bug 32675 ***