Bug 21486: Only fetch the items' barcodes

and avoid unecessary processing

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Tested and found correct AU data is returned, and passes QA test tool

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-10-17 12:32:11 -03:00 committed by Nick Clemens
parent 8746ca21a2
commit 87c2b46447

View file

@ -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);