From 13468fac3ceff15c3d935664e892448a7b1da162 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 1 Jun 2022 13:59:09 +0200 Subject: [PATCH] Bug 30876: Use Koha::Biblio Signed-off-by: Jonathan Druart --- recalls/recalls_to_pull.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recalls/recalls_to_pull.pl b/recalls/recalls_to_pull.pl index e2f7d0e15ab..06a14c5ea36 100755 --- a/recalls/recalls_to_pull.pl +++ b/recalls/recalls_to_pull.pl @@ -57,6 +57,7 @@ if ( $op eq 'list' ) { $seen_bib{$recall->biblio_id}++; # get recall data about this biblio + my $biblio = Koha::Biblios->find($recall->biblio_id); my @this_bib_recalls = Koha::Recalls->search({ biblio_id => $recall->biblio_id, status => [ 'requested','overdue','in_transit' ] }, { order_by => { -asc => 'created_date' } })->as_list; my $recalls_count = scalar @this_bib_recalls; my @unique_patrons = do { my %seen; grep { !$seen{$_->patron_id}++ } @this_bib_recalls }; @@ -71,7 +72,7 @@ if ( $op eq 'list' ) { my @locations; my @libraries; - my @items = Koha::Items->search({ biblio_id => $recall->biblio_id })->as_list; + my @items = $biblio->items->as_list; foreach my $item ( @items ) { if ( $item->can_be_waiting_recall and !$item->checkout ) { # if item can be pulled to fulfill recall, collect item data -- 2.25.1