Bug 17826: Allow extended patron attributes to be sent in arbitrary SIP2 fields
authorKyle M Hall <kyle@bywatersolutions.com>
Thu, 29 Dec 2016 15:39:28 +0000 (15:39 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 23 Mar 2018 14:45:38 +0000 (11:45 -0300)
commitdbc24783eef87520495d4795c9a17a8ab1d4f87a
treed7f1b8d0e5dd9c0b8f928603907d82c040608799
parent4537ea270b7b717f37b885dd4f715a74802641d2
Bug 17826: Allow extended patron attributes to be sent in arbitrary SIP2 fields

Some libraries need to be able to send additional patron data from the
extended patron attributes in made up SIP2 fields for the patron
information and patron status responses.

Test Plan:
1) Apply this patch
2) Create 3 new patron attributes with the codes CODE1, CODE2, CODE3.
   Make a least one repeatable.
3) Create a patron, add those attibutes for the patron, make sure there
   are at least two instances of the repeatable code
4) Edit your SIP2 config file, add the following within the login stanza:
   <patron_attribute field="XX" code="CODE1" />
   <patron_attribute field="XY" code="CODE2" />
   <patron_attribute field="XZ" code="CODE3" />
5) Using the sip cli emulator, run patron_information and
   patron_status_request messages for the patron
6) Note the values you set for the patron attributes are sent in the
   corrosponding fields!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Daniel Mauchley <dmauchley@duchesne.utah.gov>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Amended: added parentheses on line 488 when assigning hashref to array.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/ILS/Patron.pm
C4/SIP/Sip/MsgType.pm
etc/SIPconfig.xml
t/db_dependent/SIP/Patron.t