From 83b6c94ed6ebe52f4a5f5ad36206769009c0c91a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 28 Jul 2021 17:37:46 +0000 Subject: [PATCH] Bug 28057: (follow-up) Get the biblionumber column MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When we fetch the biblioitems we use a select to limit the columns fetched, we must include the biblionumber as well Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 9fd5d8b778e5f5873f83eb061227de7f817fa83b) Signed-off-by: Fridolin Somers (cherry picked from commit 6b58a1e1f589c6ceffb61ed4843fc670c24c5fce) Signed-off-by: Victor Grousset/tuxayo --- reserve/request.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/reserve/request.pl b/reserve/request.pl index 90f1a92418..d78bb7257d 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -415,7 +415,7 @@ foreach my $biblionumber (@biblionumbers) { ( $biblioitem->{biblioitemnumber} => $biblioitem ) } @{ Koha::Biblioitems->search( { biblioitemnumber => { -in => \@biblioitemnumbers } }, - { select => ['biblioitemnumber', 'publicationyear', 'itemtype']} + { select => ['biblionumber', 'biblioitemnumber', 'publicationyear', 'itemtype']} )->unblessed } }; @@ -453,7 +453,6 @@ foreach my $biblionumber (@biblionumbers) { # it's complicated logic to analyse. # (before this loop was inside that sub loop so it was O(n^2) ) my $items_any_available; - $items_any_available = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblioitem->{biblionumber}, patron => $patron }) if $patron; -- 2.39.5