Bug 36317: Koha::Biblio->host_items must use me.itemnumber

Koha::Biblio->host_items fails with search_ordered() because of ambiguous column 'itemnumber' in where clause.
It must use me.itemnumber like in Koha::Biblio->items

Test plan :
prove t/db_dependent/Koha/Biblio.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a9964bc8a9)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Fridolin Somers 2024-03-14 11:24:54 +01:00 committed by Lucas Gass
parent a267e9a25d
commit 405ddad65b
1 changed files with 1 additions and 1 deletions

View File

@ -651,7 +651,7 @@ sub host_items {
my $host_itemnumbers = $self->_host_itemnumbers;
return Koha::Items->search( { itemnumber => { -in => $host_itemnumbers } } );
return Koha::Items->search( { "me.itemnumber" => { -in => $host_itemnumbers } } );
}
=head3 _host_itemnumbers