From 69c4845409b45e83c06330756f02c0cfc4ca3737 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 17 Oct 2018 12:32:11 -0300 Subject: [PATCH] Bug 21486: Only fetch the items' barcodes and avoid unecessary processing Signed-off-by: Colin Campbell Tested and found correct AU data is returned, and passes QA test tool Signed-off-by: Alex Buckley Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens (cherry picked from commit 87c2b4644745b0333fc8211ce89899784dfa6a5e) Signed-off-by: Martin Renvoize --- C4/SIP/ILS/Patron.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/SIP/ILS/Patron.pm b/C4/SIP/ILS/Patron.pm index 72d6d59c80..89c0b5b16b 100644 --- a/C4/SIP/ILS/Patron.pm +++ b/C4/SIP/ILS/Patron.pm @@ -130,12 +130,13 @@ sub new { # FIXME: populate fine_items recall_items $ilspatron{unavail_holds} = _get_outstanding_holds($kp->{borrowernumber}); + my $pending_checkouts = $patron->pending_checkouts; - my @items_infos; + my @barcodes; while ( my $c = $pending_checkouts->next ) { - push @items_infos, $c->unblessed_all_relateds; + push @barcodes, { barcode => $c->item->barcode }; } - $ilspatron{items} = \@items_infos; + $ilspatron{items} = \@barcodes; $self = \%ilspatron; $debug and warn Dumper($self); -- 2.39.5