Bug 35418

Summary: SUSHI harvest hangs
Product: Koha Reporter: Pedro Amorim <pedro.amorim>
Component: ERMAssignee: Pedro Amorim <pedro.amorim>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P5 - low CC: jonathan.druart, jonathan.field, martin.renvoize, matt.blenkinsop, pedro.amorim, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00
Circulation function:
Bug Depends on: 34587    
Bug Blocks:    
Attachments: Bug 35418: Add TR_B2 tests
Bug 35418: Fix _get_usage_months
Bug 35418: Add TR_B2 tests
Bug 35418: Fix _get_usage_months
Bug 35418: Add TR_B2 tests
Bug 35418: Fix _get_usage_months
Bug 35418: Add TR_B2 tests
Bug 35418: Fix _get_usage_months

Description Pedro Amorim 2023-11-28 13:16:16 UTC

    
Comment 1 Pedro Amorim 2023-11-28 13:28:04 UTC
Created attachment 159289 [details] [review]
Bug 35418: Add TR_B2 tests

This test file adds tests for the TR_B2 specific report.
But also tests for this specific bug, which only happens if
the report time period ends in december
Comment 2 Pedro Amorim 2023-11-28 13:28:06 UTC
Created attachment 159290 [details] [review]
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.
Comment 3 David Nind 2023-11-29 10:24:01 UTC
Created attachment 159323 [details] [review]
Bug 35418: Add TR_B2 tests

This test file adds tests for the TR_B2 specific report.
But also tests for this specific bug, which only happens if
the report time period ends in december

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2023-11-29 10:24:03 UTC
Created attachment 159324 [details] [review]
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>
Comment 5 Andrew Auld 2023-11-29 16:08:08 UTC
Created attachment 159347 [details] [review]
Bug 35418: Add TR_B2 tests

This test file adds tests for the TR_B2 specific report.
But also tests for this specific bug, which only happens if
the report time period ends in december

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Auld <andrew.auld@ptfs-europe.com>
Comment 6 Andrew Auld 2023-11-29 16:08:10 UTC
Created attachment 159348 [details] [review]
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>
Comment 7 Tomás Cohen Arazi (tcohen) 2023-11-29 20:35:22 UTC
Created attachment 159373 [details] [review]
Bug 35418: Add TR_B2 tests

This test file adds tests for the TR_B2 specific report.
But also tests for this specific bug, which only happens if
the report time period ends in december

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>
Comment 8 Tomás Cohen Arazi (tcohen) 2023-11-29 20:35:24 UTC
Created attachment 159374 [details] [review]
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>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-11-29 20:39:28 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!