Bugzilla – Attachment 116312 Details for
Bug 27589
Error when specifying CR field in SIP Config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27589: Access item fields as hash
Bug-27589-Access-item-fields-as-hash.patch (text/plain), 1.41 KB, created by
Nick Clemens (kidclamp)
on 2021-02-04 12:06:22 UTC
(
hide
)
Description:
Bug 27589: Access item fields as hash
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-02-04 12:06:22 UTC
Size:
1.41 KB
patch
obsolete
>From 1673291cbaa395eb182986abe6e43bc5d4f0e97c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 4 Feb 2021 12:00:10 +0000 >Subject: [PATCH] Bug 27589: Access item fields as hash > >SIP item stores the item unblessed so field must be accessed as a hashref > >This patch changes the code in handle_item_information to match the code in >handle_checkin > >To test: >1 - In sip config set the cr_item_field='itype' for a sip account >2 - Restart SIP >3 - Attempt an item information requests using the sip_cli_emulator > perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -m item_information --item 39999000011791 >4 - It fails! >5 - Apply patch and restart >6 - It succeeds! >--- > C4/SIP/Sip/MsgType.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index b5ccce2539..90896b2539 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -1220,7 +1220,7 @@ sub handle_item_information { > $resp .= maybe_add( FID_ITEM_PROPS, $item->sip_item_properties, $server ); > > if ( my $CR = $server->{account}->{cr_item_field} ) { >- $resp .= maybe_add( FID_COLLECTION_CODE, $item->$CR, $server ); >+ $resp .= maybe_add( FID_COLLECTION_CODE, $item->{$CR}, $server ); > } else { > $resp .= maybe_add( FID_COLLECTION_CODE, $item->collection_code, $server ); > } >-- >2.11.0
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 27589
:
116311
|
116312
|
116313
|
116315
|
116316
|
116317
|
116318