From 05be7300acbec34a118de5c11787a9c784b8b808 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 15 Aug 2022 11:34:59 +0000 Subject: [PATCH] Bug 31313: (QA follow-up) Prefetch checkouts and branches This prefetches objects we are using in templates to avoid extar DB calls The branch fetches won't actually be used without the extra patch on 31314 that adapts home_branch and holding_branch routines to use result objects Signed-off-by: Nick Clemens Signed-off-by: Tomas Cohen Arazi --- opac/opac-detail.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 09e85e2613..9e9c0eadb0 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -501,7 +501,8 @@ $items = Koha::Items->search_ordered( $biblio->host_items->get_column('itemnumber') ] } - ] + ], + { prefetch => [ 'issue', 'homebranch', 'holdingbranch' ] } )->filter_by_visible_in_opac({ patron => $patron }) unless $specific_item; my $dat = &GetBiblioData($biblionumber); -- 2.39.2