Bug 24165

Summary: Add ability to send any item field in a library chosen SIP field
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: SIP2Assignee: Kyle M Hall (khall) <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, colin.campbell, joonas.kylmala, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17826
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.03
Circulation function:
Attachments: Bug 24165: Add ability to send any item field in a library chosen SIP field
Bug 24165: Add ability to send any item field in a library chosen SIP field
Bug 24165: Add ability to send any item field in a library chosen SIP field
Bug 24165: Add ability to send any item field in a library chosen SIP field
Bug 24165: Add ability to send any item field in a library chosen SIP field

Description Kyle M Hall (khall) 2019-12-03 20:16:44 UTC
Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses. It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.
Comment 1 Kyle M Hall (khall) 2019-12-03 20:21:18 UTC
Created attachment 95984 [details] [review]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!
Comment 2 Kyle M Hall (khall) 2020-02-19 15:55:08 UTC
Created attachment 99256 [details] [review]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!

Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Comment 3 Joonas Kylmälä 2020-07-15 12:34:12 UTC
Created attachment 106931 [details] [review]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!

Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 4 Joonas Kylmälä 2020-07-15 12:37:09 UTC
qa-tools.pl incorrectly complains

> FAIL  pod coverage
>       POD is missing for build_additional_item_fields_string

this is because SIP server code still has few files with separate .pod files so qa tool is checking if it exists there and not if it exists in the source code. I think it is outside of the scope of this bug to move the POD comments to source code files so passing QA.
Comment 5 Joonas Kylmälä 2020-07-15 12:42:29 UTC
Created attachment 106932 [details] [review]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!

Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Fixed merge conflict with number of tests (was 4, changed to 7 which is correct)
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 6 Joonas Kylmälä 2020-07-15 12:50:58 UTC
Created attachment 106934 [details] [review]
Bug 24165: Add ability to send any item field in a library chosen SIP field

Some SIP devices need access to item fields that are not sent as item information in the checkin, checkout and item information responses.
It makes sense to allow these fields to be sent in an arbitrary and configurable way, rather than hard code in each special case.

Test Plan:
1) Apply this patch
2) Edit your SIP2 config file, add the following within the login stanza:
   <item_field field="XX" code="<item field 1>" />
   <item_field field="XZ" code="<item fied 2>" />
   where <item field 1> and <item field 2> are item table columns of your choosing
3) Using the sip cli emulator, run checkout, checkin and item information
   messages using that item.
4) Note the values you set for the item columns are sent in the
   corrosponding fields!

Signed-off-by: Jill Kleven <jill.kleven@pueblolibrary.org>
Fixed merge conflict with number of tests (was 5, changed to 7 which is correct)
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Comment 7 Joonas Kylmälä 2020-07-15 12:53:02 UTC
Sorry for the extra patch attachments. I added a note about solving merge conflict. This is now ready for RM to push.
Comment 8 Jonathan Druart 2020-07-20 15:48:29 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 9 Lucas Gass (lukeg) 2020-07-27 16:49:18 UTC
backported to 20.05.x for 20.05.03
Comment 10 Aleisha Amohia 2020-08-03 22:55:56 UTC
enhancement, not backported to 19.11.x