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>
This commit is contained in:
parent
684d9263e8
commit
9988925fb5
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue