Bug 31313: (QA follow-up) Search Koha::Items

This ensures host items from otehr biblios are returned as well

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Nick Clemens 2022-08-15 11:32:03 +00:00 committed by Tomas Cohen Arazi
parent 70cb4e22c0
commit c46b2ab1cd
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -493,18 +493,16 @@ $template->param(
OPACShowCheckoutName => C4::Context->preference("OPACShowCheckoutName"),
);
my $host_items = $biblio->host_items->filter_by_visible_in_opac({ patron => $patron });
$items = $biblio->items->search_ordered(
{
$items = Koha::Items->search_ordered(
[
'me.biblionumber' => $biblionumber,
'me.itemnumber' => {
-in => [
$items->get_column('itemnumber'),
$host_items->get_column('itemnumber')
$biblio->host_items->get_column('itemnumber')
]
}
}
);
]
)->filter_by_visible_in_opac({ patron => $patron }) unless $specific_item;
my $dat = &GetBiblioData($biblionumber);
my $HideMARC = $record_processor->filters->[0]->should_hide_marc(