From b60d59eb89a1250da5122ce6acea49a9197650cd 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 Signed-off-by: Tomas Cohen Arazi --- 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 e2f7d0e15a..06a14c5ea3 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.39.5