Bugzilla – Attachment 113742 Details for
Bug 17229
ILS-DI HoldTitle and HoldItem should check if patron is expired
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17229: Check if patron is expired in CanItemBeReserved
Bug-17229-Check-if-patron-is-expired-in-CanItemBeR.patch (text/plain), 2.39 KB, created by
Arthur Suzuki
on 2020-11-17 16:41:04 UTC
(
hide
)
Description:
Bug 17229: Check if patron is expired in CanItemBeReserved
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2020-11-17 16:41:04 UTC
Size:
2.39 KB
patch
obsolete
>From bdbeb5c1c72a2a8ac6e62cfc8b7a5de57b6996ab Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 31 Aug 2016 15:27:44 +0200 >Subject: [PATCH] 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> >--- > C4/ILSDI/Services.pm | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index da37e936ae..1b4bde7f9b 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -713,9 +713,13 @@ sub HoldTitle { > my $patron = Koha::Patrons->find( $borrowernumber ); > return { code => 'PatronNotFound' } unless $patron; > >+ > # If borrower is restricted return an error code > return { code => 'PatronRestricted' } if $patron->is_debarred; > >+ # Check for patron expired, category and syspref settings >+ return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired); >+ > # Get the biblio record, or return an error code > my $biblionumber = $cgi->param('bib_id'); > my $biblio = Koha::Biblios->find( $biblionumber ); >@@ -824,6 +828,9 @@ sub HoldItem { > # If borrower is restricted return an error code > return { code => 'PatronRestricted' } if $patron->is_debarred; > >+ # Check for patron expired, category and syspref settings >+ return { code => 'PatronExpired' } if ($patron->category->effective_BlockExpiredPatronOpacActions && $patron->is_expired); >+ > # Get the biblio or return an error code > my $biblionumber = $cgi->param('bib_id'); > my $biblio = Koha::Biblios->find( $biblionumber ); >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17229
:
55059
|
55060
|
62036
|
62037
|
67324
|
67325
|
70682
|
70683
|
72970
|
72971
|
85064
|
85065
|
85066
|
85070
|
85071
|
85072
|
85118
|
85883
|
89760
|
99701
|
99702
|
99703
|
99817
|
99818
|
99819
|
113741
|
113742
|
113743
|
115081
|
115082
|
115083
|
115411
|
115435