Bugzilla – Attachment 159374 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.38 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-11-29 20:35:24 UTC
(
hide
)
Description:
Bug 35418: Fix _get_usage_months
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-11-29 20:35:24 UTC
Size:
1.38 KB
patch
obsolete
>From 63a2c87e9402944a3c728cedf38ece1049d89ffc 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> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > 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 d128b868b70..4e33f8988f5 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.43.0
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