Bug 25813: Enhance patron expiration in SIP display
authorMatthias Meusburger <matthias.meusburger@biblibre.com>
Tue, 10 Sep 2019 14:59:30 +0000 (16:59 +0200)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 22 Mar 2024 14:07:31 +0000 (15:07 +0100)
commit72fae3a9c9f85877ffe8162fc15442e3c1fed940
tree6bd5426f1dd7ad5b5eb5c03f41b07ba4dc9cd649
parent41a918975a028add5390c121750d8a91078701da
Bug 25813: Enhance patron expiration in SIP display

 Currently, the patron information returned by SIP only shows
 "PATRON EXPIRED" when the patron card has expired.

 This patch makes the display more consistant with the Opac display
 and also complies with the NotifyBorrowerDeparture system preference.

 Test plan:

  - apply the patch

  - set NotifyBorrowerDeparture to 0

  - check that nothing is ever displayed about the card expiration

  - set NotifyBorrowerDeparture to a value greater than 0

  - check that the following message will be displayed for a card that will
    expire within NotifyBorrowerDeparture days:
    "Your card will expire on {correctly formatted date}"

  - check that the following message will be displayed for a card that has
    expired:
    "Your account has expired as of {correctly formatted date}"

 You can use src/C4/SIP/interactive_patron_dump.pl for easier testing.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
C4/SIP/ILS/Patron.pm
t/db_dependent/SIP/Patron.t