From 4572fe52bd2aec802e86bc19f1d9ac18c7fe3c91 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 3 Oct 2019 15:43:56 +0200 Subject: [PATCH] Bug 21301: Remove patron informations in reserves for GetRecords ILS-DI service Actually, the GetRecords service gives many information : borrowernumber (reserves field) The issue data should not be sent by these service, its a privacy problem. Test plan : 1) Enable ILS-DI webservice 2) Place hold on an item 3) Go to {opac}/cgi-bin/koha/ilsdi.pl?service=GetRecords&id={biblionumber} 4) Check the reserves tag content Signed-off-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart (cherry picked from commit 37c042b9f3d3c307dac8e9205c65227e3c956ee3) Signed-off-by: Fridolin Somers (cherry picked from commit 813eb5afc74478f574510c0fdc197ed2ffdf54e3) Signed-off-by: Andrew Fuerste-Henry --- C4/ILSDI/Services.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm index 06e82f952c..c6c933d0cb 100644 --- a/C4/ILSDI/Services.pm +++ b/C4/ILSDI/Services.pm @@ -227,7 +227,6 @@ sub GetRecords { # Get most of the needed data my $biblioitemnumber = $biblioitem->{'biblioitemnumber'}; - my $holds = $biblio->current_holds->unblessed; my $checkouts = Koha::Checkouts->search( { biblionumber => $biblionumber }, { @@ -265,6 +264,12 @@ sub GetRecords { push @{ $biblioitem->{items}->{item} }, \%item; } + # Holds + my $holds = $biblio->current_holds->unblessed; + foreach my $hold (@$holds) { + delete $hold->{'borrowernumber'}; + } + # Hashref building... $biblioitem->{'reserves'}->{'reserve'} = $holds; $biblioitem->{'issues'}->{'issue'} = $checkouts; -- 2.39.5