Bug 28730: Add option to format AH field (due date) in SIP checkout response
authorNick Clemens <nick@bywatersolutions.com>
Wed, 21 Jul 2021 13:56:22 +0000 (13:56 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Oct 2021 09:18:29 +0000 (11:18 +0200)
commit5be090b55662cac4e045605e7b94b19f3d3ac017
tree37aba8c71163234e8e775d700336da2f506617ff
parent7babcc0718e0f12efa52159fc666578d2314909d
Bug 28730: Add option to format AH field (due date) in SIP checkout response

This patch adds a new option to sip accounts:
format_due_date

If set to 1 the AH field in checkouts will follow the dateFormat system preference and format as due dates (ignoring time portion if 23:59:59 or 11:59:59)

To test:
 1 - checkout an item via SIP:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --item 3999900000001 --patron enda -m checkout
 2 - Note the AH field is like "YYYYMMDD    HHMMSS"
 3 - Apply patch
 4 - repeat SIP checkout - nothing has changed
 5 - edit SIPConfig.xml and add format_due_date="1" to 'term1' account:
    <login id="term1"  password="term1" delimiter="|" error-detect="enabled" institution="CPL" encoding="ascii"     checked_in_ok="1" format_due_date="1"/>
 6 - restart all
 7 - repeat the SIP checkout
 8 - AH field now matches dateFormat system preference
 9 - Change your dateFormat preference
10 - repeat the SIP checkout
11 - AH matches new format

Note: If you cannot renew and don't get an AH just check the item back in:
perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su term1 -sp term1 -l CPL -t CR --item 3999900000001 --patron enda -m checkin

Signed-off-by: Winfred Thompkins <Winfred.thompkins@cedarhilltx.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/SIP/Sip/MsgType.pm
t/db_dependent/SIP/Message.t