| Summary: | A patron information request fails when no currency is set | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Jan Kissig <bibliothek> |
| Component: | SIP2 | Assignee: | Jan Kissig <bibliothek> |
| Status: | Pushed to stable --- | QA Contact: | Marcel de Rooy <m.de.rooy> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | david, jacob.omara, m.de.rooy |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes an error in SIP2 patron information responses (64) when no currency is set, which can be the case for new Koha instances.
Example, if no currency is set:
- Before the fix, there is an 'undef' error:
...
Trying 'patron_information'
SEND: 6300120251202 115652 AOCPL|AA42|ACterm1|
READ: undef
- After the fix, patron informatin is returned and there is no error:
...
Trying 'patron_information'
SEND: 6300120251202 122545 AOCPL|AA42|ACterm1|
READ: 64 00120251202
122546000000000000000000000000AOCPL|AA42|AE koha|BLY|BV0|CC5|PCS|
PIY|AFGreetings from Koha. |
|
Version(s) released in: |
26.05.00,25.11.01
|
| Circulation function: | |||
| Attachments: |
Bug 40455: SIP2 patron information fails when no currency is set
Bug 40455: SIP2 patron information fails when no currency is set Bug 40455: SIP2 patron information fails when no currency is set |
||
|
Description
Jan Kissig
2025-07-18 20:46:26 UTC
Created attachment 190075 [details] [review] Bug 40455: SIP2 patron information fails when no currency is set This fixes an error in SIP2 patron information response (64) when no currency is set, which can be the case on newly created instances. Test plan for KTD: a) Delete currency and related tables - run 'koha-mysql kohadev' to start SQL client. Then run the following queries: - delete from aqbasket; delete from aqbooksellers; delete from currency; b) exit c) run 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 115652 AOCPL|AA42|ACterm1| READ: undef d) recognize the last response: READ: undef e) apply patch and restart sip2 server via 'sudo koha-sip --restart kohadev' e) rerun 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 122545 AOCPL|AA42|ACterm1| READ: 64 00120251202 122546000000000000000000000000AOCPL|AA42|AE koha|BLY|BV0|CC5|PCS|PIY|AFGreetings from Koha. | f) check the last response is now a patron information response (64) Created attachment 190141 [details] [review] Bug 40455: SIP2 patron information fails when no currency is set This fixes an error in SIP2 patron information response (64) when no currency is set, which can be the case on newly created instances. Test plan for KTD: a) Delete currency and related tables - run 'koha-mysql kohadev' to start SQL client. Then run the following queries: - delete from aqbasket; delete from aqbooksellers; delete from currency; b) exit c) run 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 115652 AOCPL|AA42|ACterm1| READ: undef d) recognize the last response: READ: undef e) apply patch and restart sip2 server via 'sudo koha-sip --restart kohadev' e) rerun 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 122545 AOCPL|AA42|ACterm1| READ: 64 00120251202 122546000000000000000000000000AOCPL|AA42|AE koha|BLY|BV0|CC5|PCS|PIY|AFGreetings from Koha. | f) check the last response is now a patron information response (64) Signed-off-by: David Nind <david@davidnind.com> Please fill Assignee next time.. Created attachment 190199 [details] [review] Bug 40455: SIP2 patron information fails when no currency is set This fixes an error in SIP2 patron information response (64) when no currency is set, which can be the case on newly created instances. Test plan for KTD: a) Delete currency and related tables - run 'koha-mysql kohadev' to start SQL client. Then run the following queries: - delete from aqbasket; delete from aqbooksellers; delete from currency; b) exit c) run 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 115652 AOCPL|AA42|ACterm1| READ: undef d) recognize the last response: READ: undef e) apply patch and restart sip2 server via 'sudo koha-sip --restart kohadev' e) rerun 'perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su term1 -sp term1 -l CPL -m patron_information --patron 42' Attempting socket connection to 127.0.0.1:6001...connected! SEND: 9300CNterm1|COterm1|CPCPL| READ: 941 Trying 'patron_information' SEND: 6300120251202 122545 AOCPL|AA42|ACterm1| READ: 64 00120251202 122546000000000000000000000000AOCPL|AA42|AE koha|BLY|BV0|CC5|PCS|PIY|AFGreetings from Koha. | f) check the last response is now a patron information response (64) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Nice work everyone! Pushed to main for 26.05 Thanks all, pushed to 25.11.x Thanks all, pushed to 25.11.x |