Bug 41330

Summary: Brace are not escaped in serials number management
Product: Koha Reporter: Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski>
Component: SerialsAssignee: Bugs List <koha-bugs>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41330: Unit tests
Bug 41330: Escape braces in serials number management
Bug 41330: Unit tests
Bug 41330: Escape braces in serials number management

Description Baptiste Wojtkowski (bwoj) 2025-11-28 11:01:11 UTC
Steps to reproduce:
1 - Create a new subscription, go to "Serial collection" -> Edit serials
2 - Update the number to {1}
3 - Save -> You get an error 500.
Comment 1 Baptiste Wojtkowski (bwoj) 2025-12-05 11:48:41 UTC
Created attachment 190202 [details] [review]
Bug 41330: Unit tests

Do not apply patches before
1 - Create a new subscription to a serial
2 - Go to 'Serial Collection' panel and click on edit serials button
3 - Try and edit the serial number to "{1}" -> error 500
4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will
  not pass
5 - Apply patch and proceed again to 2&3 -> you will get no error
6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass
Comment 2 Baptiste Wojtkowski (bwoj) 2025-12-05 11:48:44 UTC
Created attachment 190203 [details] [review]
Bug 41330: Escape braces in serials number management

Do not apply patches before
1 - Create a new subscription to a serial
2 - Go to 'Serial Collection' panel and click on edit serials button
3 - Try and edit the serial number to "{1}" -> error 500
4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will
  not pass
5 - Apply patch and proceed again to 2&3 -> you will get no error
6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass
Comment 3 David Nind 2025-12-05 14:22:55 UTC
Created attachment 190212 [details] [review]
Bug 41330: Unit tests

Do not apply patches before
1 - Create a new subscription to a serial
2 - Go to 'Serial Collection' panel and click on edit serials button
3 - Try and edit the serial number to "{1}" -> error 500
4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will
  not pass
5 - Apply patch and proceed again to 2&3 -> you will get no error
6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2025-12-05 14:22:58 UTC
Created attachment 190213 [details] [review]
Bug 41330: Escape braces in serials number management

Do not apply patches before
1 - Create a new subscription to a serial
2 - Go to 'Serial Collection' panel and click on edit serials button
3 - Try and edit the serial number to "{1}" -> error 500
4 - Apply only unit tests patch and run `prove t/Serials/ModSerialStatus.t` -> Tests will
  not pass
5 - Apply patch and proceed again to 2&3 -> you will get no error
6 - run `prove t/Serials/ModSerialStatus.t` -> tests will pass

Signed-off-by: David Nind <david@davidnind.com>