Bugzilla – Attachment 159348 Details for
Bug 35418
SUSHI harvest hangs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35418: Fix _get_usage_months
Bug-35418-Fix-getusagemonths.patch (text/plain), 1.32 KB, created by
Andrew Auld
on 2023-11-29 16:08:10 UTC
(
hide
)
Description:
Bug 35418: Fix _get_usage_months
Filename:
MIME Type:
Creator:
Andrew Auld
Created:
2023-11-29 16:08:10 UTC
Size:
1.32 KB
patch
obsolete
>From c77ecbe21ec5987d6cbef41157c29e1678c2f06f Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 28 Nov 2023 13:24:49 +0000 >Subject: [PATCH] Bug 35418: Fix _get_usage_months > >No longer falls in an endless loop if the last month in the report period is december. > >Test plan: >1) Apply just the tests patch, run EUsage tests >prove t/db_dependent/Koha/ERM/EUsage/ >2) Wait for a few seconds. Notice SushiCounter.t it hangs. CTRL+C (cancel it) >3) Apply the fix patch. >4) Run the tests again. Notice all EUsage tests pass with no issues. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com> >--- > Koha/ERM/EUsage/SushiCounter.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/ERM/EUsage/SushiCounter.pm b/Koha/ERM/EUsage/SushiCounter.pm >index d128b868b7..4e33f8988f 100644 >--- a/Koha/ERM/EUsage/SushiCounter.pm >+++ b/Koha/ERM/EUsage/SushiCounter.pm >@@ -681,7 +681,7 @@ sub _get_usage_months { > my $end_year = substr( $end_date[0], 0, 4 ); > > my @month_headings = (); >- while ( $begin_month <= $end_month || $begin_year < $end_year ) { >+ while ( $begin_year <= $end_year && ( $begin_year != $end_year || $begin_month <= $end_month ) ) { > push( > @month_headings, > $column_headings_formatting >-- >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 35418
:
159289
|
159290
|
159323
|
159324
|
159347
|
159348
|
159373
|
159374