Bugzilla – Attachment 136263 Details for
Bug 18064
Long overdue cronjob does not follow the library's calendar and skip closed days
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18064: (QA follow-up) Clean up code
Bug-18064-QA-follow-up-Clean-up-code.patch (text/plain), 2.49 KB, created by
Kyle M Hall (khall)
on 2022-06-17 13:32:57 UTC
(
hide
)
Description:
Bug 18064: (QA follow-up) Clean up code
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-06-17 13:32:57 UTC
Size:
2.49 KB
patch
obsolete
>From 3528bbc1f9cefd14d25021ac4d72366d18dae0f2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 17 Jun 2022 09:32:28 -0400 >Subject: [PATCH] Bug 18064: (QA follow-up) Clean up code > >--- > misc/cronjobs/longoverdue.pl | 19 ++++++++++--------- > 1 file changed, 10 insertions(+), 9 deletions(-) > >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 68aceb50ea..bbc263c528 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -317,11 +317,11 @@ sub longoverdue_sth { > return C4::Context->dbh->prepare($query); > } > >-my @holidays_by_branch; >- > sub get_number_of_holidays { > my ( $start_date, $end_date ) = @_; > >+ my @holidays_by_branch; >+ > $start_date = dt_from_string($start_date); > $end_date = dt_from_string($end_date); > >@@ -421,7 +421,7 @@ foreach my $startrange (sort keys %$lost) { > my ($date2) = bounds( $endrange); > > if ( C4::Context->preference( 'LongOverdueNoticeCalendar' ) ) { >- get_number_of_holidays( $date2, $date1 ); >+ my $holidays_by_branch = get_number_of_holidays( $date2, $date1 ); > > foreach my $branch ( @holidays_by_branch ) { > >@@ -436,13 +436,13 @@ foreach my $startrange (sort keys %$lost) { > $sth_items->execute($startrange, $endrange_with_holidays, $lostvalue); > } > } else { >- >- # print "\nRange ", ++$i, "\nDue $startrange - $endrange days ago ($date2 to $date1), lost => $lostvalue\n" if($verbose); >- $verbose and >- printf "\nRange %s\nDue %3s - %3s days ago (%s to %s), lost => %s\n", ++$i, >- $startrange, $endrange, $date2, $date1, $lostvalue; >- $sth_items->execute($startrange, $endrange, $lostvalue); >+ # print "\nRange ", ++$i, "\nDue $startrange - $endrange days ago ($date2 to $date1), lost => $lostvalue\n" if($verbose); >+ $verbose and >+ printf "\nRange %s\nDue %3s - %3s days ago (%s to %s), lost => %s\n", ++$i, >+ $startrange, $endrange, $date2, $date1, $lostvalue; >+ $sth_items->execute($startrange, $endrange, $lostvalue); > } >+ > $count=0; > ITEM: while (my $row=$sth_items->fetchrow_hashref) { > if( $filter_borrower_categories ) { >@@ -466,6 +466,7 @@ foreach my $startrange (sort keys %$lost) { > } > $count++; > } >+ > push @report, { > startrange => $startrange, > endrange => $endrange, >-- >2.32.0 (Apple Git-132)
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 18064
:
130363
|
135888
|
136213
|
136214
|
136263
|
139978
|
145920
|
147496
|
147497
|
159088