Bugzilla – Attachment 13976 Details for
Bug 9252
Add option to send patron's home branch in AF field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9252 - Add option to send patron's home branch in AF field
Bug-9252---Add-option-to-send-patrons-home-branch-.patch (text/plain), 3.32 KB, created by
Kyle M Hall (khall)
on 2012-12-10 14:03:39 UTC
(
hide
)
Description:
Bug 9252 - Add option to send patron's home branch in AF field
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2012-12-10 14:03:39 UTC
Size:
3.32 KB
patch
obsolete
>From ef6649b5d9c1cf8b809a37c65346f3606c961b69 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 10 Dec 2012 08:54:24 -0500 >Subject: [PATCH] Bug 9252 - Add option to send patron's home branch in AF field > >This patch gives you the option of sending a patrons home branch code >in an AF field for patron status requests. It is controlled at the account >login level, so it can be enable on a per-sip-login basis. > >Test Plan: >1) Apply patch >2) Edit SIPconfig.xml, add the parameter 'send_patron_home_library_in_af="1"' > to the login you will be using to test. >3) Start your SIP2 server. >4) Connect to it via telnet ( something like: '9300CNterm1|COterm1|CPCPL|' ) >5) Send a patron status request ( like: '2300120121110 82925AOCPL|AA23529000035676|ACterm1|ADletmein' ) >6) Examine reponse you should see something like this: > "24 00120121210 085332AEHenry Acevedo|AA23529000035676|BLY|CQN|AFGreetings from Koha. |AFMPL|AO|" > Note the second AF field with the value MPL. >--- > C4/SIP/Sip/Configuration/Account.pm | 5 +++++ > C4/SIP/Sip/MsgType.pm | 6 ++++-- > etc/SIPconfig.xml | 3 ++- > 3 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/C4/SIP/Sip/Configuration/Account.pm b/C4/SIP/Sip/Configuration/Account.pm >index 7b3d03e..2125889 100644 >--- a/C4/SIP/Sip/Configuration/Account.pm >+++ b/C4/SIP/Sip/Configuration/Account.pm >@@ -37,4 +37,9 @@ sub password { > return $self->{password}; > } > >+sub send_patron_home_library_in_af { >+ my $self = shift; >+ return $self->{send_patron_home_library_in_af}; >+} >+ > 1; >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 43f48dc..4884cb5 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -431,7 +431,8 @@ sub handle { > # information will be returned to the terminal. > # > sub build_patron_status { >- my ($patron, $lang, $fields)= @_; >+ my ($patron, $lang, $fields, $server)= @_; >+ > my $patron_pwd = $fields->{(FID_PATRON_PWD)}; > my $resp = (PATRON_STATUS_RESP); > >@@ -452,6 +453,7 @@ sub build_patron_status { > } > > $resp .= maybe_add(FID_SCREEN_MSG, $patron->screen_msg); >+ $resp .= maybe_add(FID_SCREEN_MSG, $patron->{branchcode}) if ( $server->{account}->{send_patron_home_library_in_af} ); > $resp .= maybe_add(FID_PRINT_LINE, $patron->print_line); > } else { > # Invalid patron id. Report that the user has no privs., >@@ -485,7 +487,7 @@ sub handle_patron_status { > #warn $fields->{(FID_INST_ID)}; > $ils->check_inst_id($fields->{(FID_INST_ID)}, "handle_patron_status"); > $patron = $ils->find_patron($fields->{(FID_PATRON_ID)}); >- $resp = build_patron_status($patron, $lang, $fields); >+ $resp = build_patron_status($patron, $lang, $fields, $server ); > $self->write_msg($resp); > return (PATRON_STATUS_REQ); > } >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index f229b9a..2f79391 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -41,7 +41,8 @@ > <login id="koha2" password="koha" institution="kohalibrary2" /> > <login id="lpl-sc" password="1234" institution="LPL" /> > <login id="lpl-sc-beacock" password="xyzzy" >- delimiter="|" error-detect="enabled" institution="LPL" /> >+ delimiter="|" error-detect="enabled" institution="LPL" >+ send_patron_home_library_in_af="1" /> > </accounts> > > <!-- >-- >1.7.2.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 9252
:
13976
|
13977
|
18210
|
18211
|
18212
|
19083
|
19084
|
19469
|
20264
|
20265