Bug 17229: Check if patron is expired in CanItemBeReserved
authorJulian Maurice <julian.maurice@biblibre.com>
Wed, 31 Aug 2016 13:27:44 +0000 (15:27 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Jan 2021 14:45:11 +0000 (15:45 +0100)
commit9c3f267350b07c16b4c8297ee7c05853748a26f9
treed9d01e79a8883522c184c57c20de8371a3e14c93
parenta369a9c8c1867536ec537dfcae20a49349fffb34
Bug 17229: Check if patron is expired in CanItemBeReserved

This way, calls to ILS-DI HoldTitle and HoldItem do this check too

Added test plan to commit message :
-Set Syspref  BlockExpiredPatronOpacActions to "ON",
-Set a patron's category variable "Block expired patrons" to "Follow SysPref" or -"Block" (ideally test both).
-Get the id of a patron from this category (ie : 1234).
-Set this patron's expiration date to a date earlier than today.
-Get a biblionumber which can be reserved (ie : 5678).

Put the following string in your webbrowser (replacing OpacBaseUrl, 1234 and 5678 by your own values) :
http://[OpacBaseUrl]/cgi-bin/koha/ilsdi.pl?service=HoldTitle&patron_id=1234&bib_id=5678&request_location='127.0.0.1'

Should not create a new hold for the patron and report an error.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/ILSDI/Services.pm