Bugzilla – Attachment 190075 Details for
Bug 40455
A patron information request fails when no currency is set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40455: SIP2 patron information fails when no currency is set
Bug-40455-SIP2-patron-information-fails-when-no-cu.patch (text/plain), 2.23 KB, created by
Jan Kissig
on 2025-12-02 12:33:43 UTC
(
hide
)
Description:
Bug 40455: SIP2 patron information fails when no currency is set
Filename:
MIME Type:
Creator:
Jan Kissig
Created:
2025-12-02 12:33:43 UTC
Size:
2.23 KB
patch
obsolete
>From 7a163f24ff17e3be6b759753dde108b2bead6e46 Mon Sep 17 00:00:00 2001 >From: Jan Kissig <bibliothek@th-wildau.de> >Date: Tue, 2 Dec 2025 12:30:13 +0000 >Subject: [PATCH] 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) >--- > C4/SIP/ILS/Patron.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm >index 1caf2888fe6..5a387c14514 100644 >--- a/C4/SIP/ILS/Patron.pm >+++ b/C4/SIP/ILS/Patron.pm >@@ -131,7 +131,10 @@ sub new { > } > > # Get currency 3 chars max >- my $currency = substr Koha::Acquisition::Currencies->get_active->currency, 0, 3; >+ my $currency = Koha::Acquisition::Currencies->get_active; >+ if ($currency) { >+ $currency = substr $currency->currency, 0, 3; >+ } > > my $circ_blocked = > ( C4::Context->preference('OverduesBlockCirc') ne "noblock" && defined $flags->{ODUES}->{itemlist} ) ? 1 : 0; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40455
:
190075
|
190141