From d0590904723d79fda669a6ce8e0e44e0251046f6 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 14 Nov 2018 11:18:58 +0100 Subject: [PATCH] Bug 21832: Restore is_expired in ILS-DI GetPatronInfo service Since Bug 17578 removed C4::Member::GetMemberDetails, the information "is_expired" disappeared from ILS-DI service GetPatronInfo. I propose to restore in by adding the code that exisited in C4::Member::GetMemberDetails directly in C4::ILSDI::Services. Test plan : 1) Enable ILS-DI webservice 2) Choose a patron not expired 3) Call web-service (replace X with patron's borrowernumber) : /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X 4) You see : 0 5) Choose a patron expired 6) Call web-service (replace X with patron's borrowernumber) : /cgi-bin/koha/ilsdi.pl?service=GetPatronInfo&patron_id=X 7) You see : 1 Signed-off-by: Maryse Simard Signed-off-by: Katrin Fischer Signed-off-by: Katrin Fischer Signed-off-by: Josef Moravec Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 0748911eb26f2a35d8ba881dcb92e37a979fc9a9) Signed-off-by: Martin Renvoize (cherry picked from commit 531040897b2c02114fe51a6c8de338f8bb61c3cb) Signed-off-by: Lucas Gass (cherry picked from commit ec1145c148aefc5ea37a9dfbb5827da14e1d839d) Signed-off-by: Fridolin Somers --- C4/ILSDI/Services.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index ada4be2132..d1114e8418 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -479,6 +479,9 @@ sub GetPatronInfo { $borrower->{'attributes'} = $attrs; } + # Add is expired information + $borrower->{'is_expired'} = $patron->is_expired ? 1 : 0; + return $borrower; } -- 2.39.5