From 7fb5f6bad7c4539e7c5230db3cf1d6d29f836c75 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 14 Mar 2024 11:24:54 +0100 Subject: [PATCH] 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 Signed-off-by: Emmi Takkinen Signed-off-by: Martin Renvoize Signed-off-by: Katrin Fischer (cherry picked from commit a9964bc8a9f89d8da00e5056ceb3f06cf551ce72) Signed-off-by: Lucas Gass (cherry picked from commit 405ddad65ba6d0e22efb079a6542e47f8d6ed309) Signed-off-by: Fridolin Somers --- Koha/Biblio.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index c4bc06d01b..9bb80491e0 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -595,7 +595,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