Bugzilla – Attachment 187144 Details for
Bug 13666
Allow SIP2 checkin/checkout to get branch from institution_id field AO
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13666 - Allow SIP2 checkin/checkout to get branch from institution_id field AO
Bug-13666---Allow-SIP2-checkincheckout-to-get-bran.patch (text/plain), 1.75 KB, created by
Alex Buckley
on 2025-10-01 00:25:05 UTC
(
hide
)
Description:
Bug 13666 - Allow SIP2 checkin/checkout to get branch from institution_id field AO
Filename:
MIME Type:
Creator:
Alex Buckley
Created:
2025-10-01 00:25:05 UTC
Size:
1.75 KB
patch
obsolete
>From cb0eb6446a864a900da87fafe4f0cff1fedefcc8 Mon Sep 17 00:00:00 2001 >From: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> >Date: Thu, 5 Feb 2015 15:46:50 +0100 >Subject: [PATCH] Bug 13666 - Allow SIP2 checkin/checkout to get branch from > institution_id field AO > >This patch adds a policy flag in SIPConfig.xml that allows overriding branch on >SIP2 checkout with the AO (institution id) field. Since SIP2 also uses C4::Context >this patch has to modify C4::Context->userenv->{'branch'} > >Test plan: >1) Either use telnet or apply patch from bug #13159 to use sip command line client >2) Checkout book with SIP2 using a modified institution id (field AO) than > the one defined in SIPConfig.xml for the account >3) Notice returned AO is still same as in SIPConfig account >4) Also notice checkout history in admin gives same 'checked out from' >5) Apply this patch and add 'allow_branch_override="true" to the policy of your ILS >6) Restart SIP server >7) Repeat 2) >8) Notice that 3) and 4) now reports the modified institution id >--- > C4/SIP/Sip/MsgType.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 3ae395d3bd1..2fed0ec2c6a 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -562,6 +562,13 @@ sub handle_checkout { > $item_id = $fields->{ (FID_ITEM_ID) }; > my $fee_ack = $fields->{ (FID_FEE_ACK) }; > >+ # Overriding branch context and institution_id from value in AO >+ # if allow_branch_override policy is set on institution >+ if ($server->{policy}->{allow_branch_override}) { >+ $inst = $fields->{(FID_INST_ID)}; >+ C4::Context->userenv->{'branch'} = $inst; >+ } >+ > if ( $no_block eq 'Y' ) { > > # Off-line transactions need to be recorded, but there's >-- >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 13666
:
35672
|
40767
|
40768
|
40769
| 187144