Bug 25805

Summary: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron
Product: Koha Reporter: Kyle M Hall <kyle>
Component: SIP2Assignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: aleisha, colin.campbell, jonathan.druart, lucas, martin.renvoize, tomascohen, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.02, 19.11.08, 19.05.14
Attachments: Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron
Bug 25805: Regression tests
Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron
Bug 25805: Regression tests
Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron
Bug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name

Description Kyle M Hall 2020-06-18 13:01:12 UTC
This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode. The subroutine hold_patron_bcode should always return an empty string, not undef.
Comment 1 Kyle M Hall 2020-06-18 13:06:17 UTC
Created attachment 106009 [details] [review]
Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!
Comment 2 Tomás Cohen Arazi 2020-06-18 19:58:58 UTC
Created attachment 106029 [details] [review]
Bug 25805: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi 2020-06-18 19:59:04 UTC
Created attachment 106030 [details] [review]
Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 4 Martin Renvoize 2020-06-19 12:33:20 UTC
Created attachment 106078 [details] [review]
Bug 25805: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2020-06-19 12:33:23 UTC
Created attachment 106079 [details] [review]
Bug 25805: SIP will show hold patron name (DA) as something like C4::SIP::SIPServer=HASH(0x88175c8) if there is no patron

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2020-06-19 12:33:56 UTC
Works as expected, regressions tests present and passes qa scripts.

Passing QA
Comment 7 Jonathan Druart 2020-06-24 12:26:27 UTC
Please adjust the description of the main patch.
Comment 8 Kyle M Hall 2020-06-24 13:05:04 UTC
(In reply to Jonathan Druart from comment #7)
> Please adjust the description of the main patch.

How would you like it adjusted?
Comment 9 Jonathan Druart 2020-06-24 13:38:21 UTC
To describe what the patch does, not what the problem is (ie. not a copy/paste of the bug report title).
Comment 10 Kyle M Hall 2020-06-24 15:46:12 UTC
Created attachment 106257 [details] [review]
Bug 25805: Return empty strings instead of undef in C4::SIP::ILS::Item::hold_patron_name

This bug is basically the same as bug 24966, but for hold_patron_name instead of hold_patron_bcode.
The subroutine hold_patron_bcode should always return an empty string, not undef.

Test Plan:
1) Using the SIP cli emulator, checkin an item that is not checked out
2) Note the DA field contains someting like "C4::SIP::SIPServer=HASH(0x88175c8)"
   The hex number will almost certainly be different from this example
3) Apply this patch
4) Restart the SIP server
5) Run the SIP checkin again
6) Note the DA field is no longer present!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Jonathan Druart 2020-06-25 09:12:42 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 12 Lucas Gass 2020-07-13 15:13:53 UTC
backported to 20.05.x for 20.05.02
Comment 13 Aleisha Amohia 2020-07-16 04:07:06 UTC
backported to 19.11.x for 19.11.08
Comment 14 Victor Grousset/tuxayo 2020-07-26 15:07:43 UTC
Backported to 19.05.x branch for 19.05.14