]> git.koha-community.org Git - koha.git/commit
Bug 31236: Add ability to send custom item fields via SIP using Template Toolkit
authorKyle Hall <kyle@bywatersolutions.com>
Mon, 25 Jul 2022 14:56:08 +0000 (10:56 -0400)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 12 Sep 2022 20:44:36 +0000 (17:44 -0300)
commit14cfdfd727cea3dfbc23c2c17c686af5f5ba15ba
treeca8c6cb95359fd8e40690625ac5b5b5b68af501d
parent1e9f6e61d59cd7e8815661346bc1d0a3d46300c2
Bug 31236: Add ability to send custom item fields via SIP using Template Toolkit

Koha has been able to send arbitrary item fields via the "item_field" parameter in the config. We have partners that need the ability to created custom item fields from templates, as the item_fields feature cannot accomplish what they need. We need to add a templated custom field feature for items, similar to what we have for patrons.

Test Plan:
1) Apply this patch
2) Choose a SIP login to use, edit that account and add the following
   *inside* the login section:
   <custom_item_field field="IN" template="[% item.itemnumber %]" />
3) Restart SIP
4) Run an item information query
5) Note the itemnumber is sent in the IN field!

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Edit: fixed tests count
C4/SIP/ILS/Item.pm
C4/SIP/Sip/MsgType.pm
etc/SIPconfig.xml
t/db_dependent/SIP/Message.t