From 6d7a12302bd219e8766b2eee075251f4f06af0a4 Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Tue, 17 Nov 2020 19:02:16 +0000 Subject: [PATCH] Bug 24488: (QA follow-up) Remove two queries out of foreach cycle Signed-off-by: Josef Moravec Signed-off-by: Michal Denar Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- circ/pendingreserves.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl index ccf7627ec2..f14ea2ba8a 100755 --- a/circ/pendingreserves.pl +++ b/circ/pendingreserves.pl @@ -191,11 +191,12 @@ my $distinct_holds = Koha::Holds->search( ); my @biblionumbers = uniq $distinct_holds->get_column('biblionumber'); +my @branchtransfers = map { $_->itemnumber } Koha::Item::Transfers->search({ datearrived => undef }, { columns => [ 'itemnumber' ], collapse => 1 }); +my @waiting_holds = map { $_->itemnumber } Koha::Holds->search({'found' => 'W'}, { columns => [ 'itemnumber' ], collapse => 1 }); + # make final reserves hash and fill with info my $reserves; foreach my $bibnum ( @biblionumbers ){ - my @branchtransfers = map { $_->itemnumber } Koha::Item::Transfers->search({ datearrived => undef }, { columns => [ 'itemnumber' ], collapse => 1 }); - my @waiting_holds = map { $_->itemnumber } Koha::Holds->search({'found' => 'W'}, { columns => [ 'itemnumber' ], collapse => 1 }); my @items = Koha::Items->search( { -- 2.39.5