From 9b1c397bee25384f65d28de8d9a3cf461b22dd48 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 9 Aug 2022 13:21:05 +0000 Subject: [PATCH] Bug 31319: (QA follow-up) Search items directly (biblio not used yet) Signed-off-by: Nick Clemens JD amended patch: add 'me' prefix to prevent failure if biblio is linked with a subscription DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394 Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- tags/list.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tags/list.pl b/tags/list.pl index b9aec1aa19..e92b3b207b 100755 --- a/tags/list.pl +++ b/tags/list.pl @@ -60,8 +60,7 @@ else { for ( @{$taglist} ) { # FIXME We should use Koha::Biblio here my $dat = &GetBiblioData( $_->{biblionumber} ); - my $biblio = Koha::Biblios->find($dat->{biblionumber}); - my $items = $biblio->items->search_ordered; + my $items = Koha::Items->search_ordered({ 'me.biblionumber' => $dat->{biblionumber} }); $dat->{biblionumber} = $_->{biblionumber}; $dat->{tag_id} = $_->{tag_id}; $dat->{items} = $items; -- 2.39.5