Bugzilla – Attachment 135547 Details for
Bug 30876
recalls/recalls_to_pull.pl introduces an incorrect use of ->search in list context
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30876: (follow-up) Use the $biblio object even further
Bug-30876-follow-up-Use-the-biblio-object-even-fur.patch (text/plain), 1.83 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-06-01 13:29:58 UTC
(
hide
)
Description:
Bug 30876: (follow-up) Use the $biblio object even further
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-06-01 13:29:58 UTC
Size:
1.83 KB
patch
obsolete
>From e11a0ca3b68ca6a93811acda909a7109531b887a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 1 Jun 2022 10:12:05 -0300 >Subject: [PATCH] Bug 30876: (follow-up) Use the $biblio object even further > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > recalls/recalls_to_pull.pl | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/recalls/recalls_to_pull.pl b/recalls/recalls_to_pull.pl >index 06a14c5ea3..a45ee8248d 100755 >--- a/recalls/recalls_to_pull.pl >+++ b/recalls/recalls_to_pull.pl >@@ -57,8 +57,11 @@ 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 $biblio = $recall->biblio; >+ my @this_bib_recalls = $biblio->recalls->search( >+ { 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 }; > my $patrons_count = scalar @unique_patrons; >@@ -98,7 +101,7 @@ if ( $op eq 'list' ) { > my @unique_libraries = do { my %seen; grep { !$seen{$_}++ } @libraries }; > > push( @pull_list, { >- biblio => $recall->biblio, >+ biblio => $biblio, > items_count => $items_count, > recalls_count => $recalls_count, > patrons_count => $patrons_count, >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30876
:
135534
|
135535
|
135536
|
135546
| 135547