Bug 31236 - Add ability to send custom item fields via SIP using Template Toolkit
Summary: Add ability to send custom item fields via SIP using Template Toolkit
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: SIP2 (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Kyle M Hall
QA Contact: Martin Renvoize
URL:
Keywords: release-notes-needed
Depends on:
Blocks:
 
Reported: 2022-07-25 14:55 UTC by Kyle M Hall
Modified: 2023-06-08 22:32 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 31236: Add ability to send custom item fields via SIP using Template Toolkit (6.00 KB, patch)
2022-07-25 14:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31236: Add ability to send custom item fields via SIP using Template Toolkit (6.06 KB, patch)
2022-08-23 15:14 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2022-07-25 14:55:56 UTC
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.
Comment 1 Kyle M Hall 2022-07-25 14:58:38 UTC
Created attachment 138104 [details] [review]
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!
Comment 2 Martin Renvoize 2022-08-23 15:14:51 UTC
Created attachment 139689 [details] [review]
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>
Comment 3 Martin Renvoize 2022-08-23 15:17:17 UTC
All works as described, no regressions and it contains unit tests!

Going for a straight QA.. Passed.
Comment 4 Tomás Cohen Arazi 2022-09-12 20:47:30 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!