From 8f345a145301dcd468636edfec288afebc79044c 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 --- tags/list.pl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tags/list.pl b/tags/list.pl index b9aec1aa196..e92b3b207bb 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.25.1