]> git.koha-community.org Git - koha.git/commit
Bug 20816: [19.11.x] Add ability to define custom templated fields in SIP patron...
authorNick Clemens <nick@bywatersolutions.com>
Wed, 19 Jun 2019 17:59:14 +0000 (17:59 +0000)
committerJoy Nelson <joy@bywatersolutions.com>
Mon, 11 May 2020 19:09:47 +0000 (19:09 +0000)
commitcb62a145f5acf596713f1358cac3ed822bf04f97
tree7201ecbb72bda2a822e4884c9784608a92afbb2d
parent93f37f3a03fc1205b3c3cb54e650081dc3dd79ea
Bug 20816: [19.11.x] Add ability to define custom templated fields in SIP patron responses

To test:
 1 - You will need to enable SIP on your testing instance
    cp etc/SIPconfig.xml /etc/koha/sites/kohadev/
    sudo koha-start-sip
    add a user listed in the SIPconfig to your system and give them permissions (superlibrarian works)
    on koha-testing-docker you should be able to start sip with user koha/koha without any adjustments
 2 - If you copied the above file you should be set to get custom field DE with dateexpiry
     Otherwise edit the sip login for the user to have a custom section like:
  <login id="koha"   password="koha"  delimiter="|" error-detect="enabled" institution="kohalibrary" encoding="utf8" >
  <custom_patron_field field="DE" template="[% patron.dateexpiry %]" />
  </login>
 3 - send a status test using the sip cli tester:
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l kohalibrary --patron 23529001000463 -m patron_status_request
 4 - send an information test using the sip cli tester:
     perl misc/sip_cli_emulator.pl -a 127.0.0.1 -p 6001 -su koha -sp koha -l kohalibrary --patron 23529001000463 -m patron_information
 5 - confirm you receive the DE field with a dateexpiry
 6 - Add your own custom fields and confirm it works with several
         <custom_patron_field field="EW" template="Phone: [% patron.phone %] Email: [% patron.email %]" />
 7 - prove -v t/db_dependent/SIP/Patron.t
 8 - prove -v t/db_dependent/SIP/

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Bug 20816: Make SIP tests pass under ES

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
C4/SIP/ILS/Patron.pm
C4/SIP/Sip.pm
C4/SIP/Sip/MsgType.pm
etc/SIPconfig.xml
t/db_dependent/SIP/Message.t
t/db_dependent/SIP/Patron.t
t/db_dependent/SIP/Transaction.t