Bugzilla – Attachment 169407 Details for
Bug 9596
Allow longoverdue.pl to be configured per library on the command line
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9596: (QA follow-up) Only find a given patron once
Bug-9596-QA-follow-up-Only-find-a-given-patron-onc.patch (text/plain), 2.20 KB, created by
Kyle M Hall (khall)
on 2024-07-23 10:39:27 UTC
(
hide
)
Description:
Bug 9596: (QA follow-up) Only find a given patron once
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2024-07-23 10:39:27 UTC
Size:
2.20 KB
patch
obsolete
>From 12753504a76091c6a477338a82e366335cfe4222 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 23 Jul 2024 06:39:07 -0400 >Subject: [PATCH] Bug 9596: (QA follow-up) Only find a given patron once > >--- > misc/cronjobs/longoverdue.pl | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 9aa5242616d..e92aea4cb6a 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -464,15 +464,18 @@ foreach my $startrange (sort keys %$lost) { > $sth_items->execute($startrange, $endrange, $lostvalue); > $count=0; > ITEM: while (my $row=$sth_items->fetchrow_hashref) { >+ my $patron; > if( $filter_borrower_categories ) { >- my $category = uc Koha::Patrons->find( $row->{borrowernumber} )->categorycode(); >+ $patron ||= Koha::Patrons->find( $row->{borrowernumber} ); >+ my $category = uc $patron->categorycode(); > next ITEM unless ( $category_to_process{ $category } ); > } > if ($filter_branches) { > my $lib; > for ($circ_control_pref) { > if ( $_ eq 'PatronLibrary' ) { >- $lib = Koha::Patrons->find( $row->{borrowernumber} )->branchcode(); >+ $patron ||= Koha::Patrons->find( $row->{borrowernumber} ); >+ $lib = $patron->branchcode(); > } elsif ( $_ eq 'PickupLibrary' ) { > $lib = C4::Context->userenv->{'branch'}; > } else { # ( $_ eq 'ItemHomeLibrary' ) >@@ -492,7 +495,7 @@ foreach my $startrange (sort keys %$lost) { > if ( $charge && $charge eq $lostvalue ) { > LostItem( $row->{'itemnumber'}, 'cronjob', $mark_returned ); > } elsif ( $mark_returned ) { >- my $patron = Koha::Patrons->find( $row->{borrowernumber} ); >+ $patron ||= Koha::Patrons->find( $row->{borrowernumber} ); > MarkIssueReturned($row->{borrowernumber},$row->{itemnumber},undef,$patron->privacy) > } > } >-- >2.30.2
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 9596
:
162070
|
162250
|
167343
|
169405
|
169406
| 169407 |
170213
|
170222