From de2396adb07278c8e22e3d1bbe879c731347a5de Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Fri, 6 Jan 2023 14:41:57 -0700 Subject: [PATCH] Bug 32583 - Restore display of only one item in catalogue/moredetails Bug 31315 (Remove GetItemsInfo from moredetail) removed the code that limits the items displayed to only one item if the itemnumber was passed as a parameter to the page. This restores that code. Test plan: 1. find a title with multple items. 2. click on an items barcode in the holdings table on the title details page. 3. observe that all items are shown on the catalogue/moredetails page. 4. apply patch. 5. refresh (catalogue/moredetails) page. 6. observe that only the item for the barcode clicked on is shown. Signed-off-by: David Nind --- catalogue/moredetail.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index 90f2de0b07..f00010dc7c 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -146,6 +146,7 @@ foreach ( keys %{$data} ) { $template->param( "$_" => defined $data->{$_} ? $data->{$_} : '' ); } +($itemnumber) and @items = (grep {$_->itemnumber == $itemnumber} @items); my @item_data; foreach my $item (@items){ -- 2.30.2