Koha's SIP2 server should have support for the AV field ( field items ). The biggest problem with this field is that its' contents are not really defined in SIP2 protocol specification. All it says is "this field should be sent for each fine item". Due to this, I think the contents of the field need to be configurable at the login level, so that the contents can be defined based on the SIP2 devices requirements for the AV field.
Created attachment 40885 [details] [review] Bug 14512 - Add support for AV field to Koha's SIP2 Server Koha's SIP2 server should have support for the AV field ( field items ). The biggest problem with this field is that its' contents are not really defined in SIP2 protocol specification. All it says is "this field should be sent for each fine item". Due to this, I think the contents of the field need to be configurable at the login level, so that the contents can be defined based on the SIP2 devices requirements for the AV field. Test Plan: 1) Apply this patch 2) Find a patron with outstanding fines 3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value " Y " 4) Note there is an AV field for each fee containing the description and amount 5) Edit your sip config, add an av_field_template parameter to the login you are using such as av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" 6) Restart your SIP server 7) Repeat the patron information request 8) Note your custom AV field is being used!
Created attachment 40886 [details] [review] Bug 14512 - Add support for AV field to Koha's SIP2 Server Koha's SIP2 server should have support for the AV field ( field items ). The biggest problem with this field is that its' contents are not really defined in SIP2 protocol specification. All it says is "this field should be sent for each fine item". Due to this, I think the contents of the field need to be configurable at the login level, so that the contents can be defined based on the SIP2 devices requirements for the AV field. Test Plan: 1) Apply this patch 2) Find a patron with outstanding fines 3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value " Y " 4) Note there is an AV field for each fee containing the description and amount 5) Edit your sip config, add an av_field_template parameter to the login you are using such as av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" 6) Restart your SIP server 7) Repeat the patron information request 8) Note your custom AV field is being used!
Created attachment 41238 [details] [review] [SIGNED-OFF] Bug 14512 - Add support for AV field to Koha's SIP2 Server Koha's SIP2 server should have support for the AV field ( field items ). The biggest problem with this field is that its' contents are not really defined in SIP2 protocol specification. All it says is "this field should be sent for each fine item". Due to this, I think the contents of the field need to be configurable at the login level, so that the contents can be defined based on the SIP2 devices requirements for the AV field. Test Plan: 1) Apply this patch 2) Find a patron with outstanding fines 3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value " Y " 4) Note there is an AV field for each fee containing the description and amount 5) Edit your sip config, add an av_field_template parameter to the login you are using such as av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" 6) Restart your SIP server 7) Repeat the patron information request 8) Note your custom AV field is being used! Signed-off-by: Chris Davis <cgdavis@uintah.utah.gov>
Kyle, I don't have any idea what is a AV field, so it's a bit difficult to test this patch. Could you please detail the step 8 8) Note your custom AV field is being used! What am I supposed to see where? :)
The AV field is for SIP2 fine items. There should be an AV field returned for each fee/fine in Koha. The specification doesn't actually specify what each AV field should look like, and different SIP2 devices expect different data, which is why I've made the contents of the field configurable. You should expect to see the AV fields in the SIP2 response for your Patron Information request ( assuming you pass in the flag requesting the fee items ).
3M machines used to expect an item identifier in AV and would then issue an item information request to get fee amount. That approach can be a bit flawed as not all financial transactions necessarily relate to items and in default settings I dont see AV being requested by most biblioteca/3M units
Here is an example AV field from another ILS I received from Comprise Technologies, a company that makes payment systems with work via SIP: AV31982012795201 188 $0.20 "OVERDUE" Barbie. A fashion fairytale [videorecording]
This enhancement is for my institution, and so I thank you guys for your work on it. -- Christopher Davis, MLS Systems & E-Services Librarian Uintah County Library uintahlibrary.org basinlibraries.org facebook.com/uintahcountylibrary
Created attachment 49657 [details] [review] Bug 14512 - Add support for AV field to Koha's SIP2 Server Koha's SIP2 server should have support for the AV field ( field items ). The biggest problem with this field is that its' contents are not really defined in SIP2 protocol specification. All it says is "this field should be sent for each fine item". Due to this, I think the contents of the field need to be configurable at the login level, so that the contents can be defined based on the SIP2 devices requirements for the AV field. Test Plan: 1) Apply this patch 2) Find a patron with outstanding fines 3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value " Y " 4) Note there is an AV field for each fee containing the description and amount 5) Edit your sip config, add an av_field_template parameter to the login you are using such as av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" 6) Restart your SIP server 7) Repeat the patron information request 8) Note your custom AV field is being used! Signed-off-by: Chris Davis <cgdavis@uintah.utah.gov> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Detailed notes: SIP setup: a) Create a Koha patron with 'circulate' permissions and a username/password matching a <login> in SIPconfig.xml (in the case of a git install, username/pw term1/term1 works). b) Start the SIP server (adjusting paths as needed): perl C4/SIP/SIPserver.pm ~/l/koha/etc/SIPconfig.xml 1) Apply this patch 2) Find a patron with outstanding fines JW: On my system this was cardnumber 23529000120056. 3) Run a patron information request using misc/sip_cli_emulator.pl using the new -s option with the value " Y " JW: $ perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l term1 -t CR -m patron_information --patron 23529000120056 -s " Y " 4) Note there is an AV field for each fee containing the description and amount JW: Confirmed for multiple fines (in output of above command): ...|AVHold waiting too long 292 5.00|AVPatron sucks 7.00|... JW: Note the "AVHold waiting too long 292 5.00" and "AVPatron sucks 7.00" parts of the response. 5) Edit your sip config, add an av_field_template parameter to the login you are using such as av_field_template="TEST [% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" JW: The relevant line in SIPconfig.xml now looks like (I used %.3f for the hell of it): <login id="term1" password="term1" delimiter="|" error-detect="enabled" institution="CPL" encoding="ascii" checked_in_ok="1" av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.3f') %]" /> 6) Restart your SIP server 7) Repeat the patron information request 8) Note your custom AV field is being used!^ JW: Confirmed. ...|AVHold waiting too long 292 5.000|AVPatron sucks 7.000|...
Pushed to master - Should be in the May 2016 release. Thanks!