SPIKE - Find the root cause of MODFEE-249

Description

The issue seems to be intermittent - sometimes it can be reproduced on BugFest Kiwi, sometimes it can't, which suggests that the issue is not with the code. Also, there's no useful information in the logs. It needs to be investigated further before we can propose a fix.

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Alexander Kurash May 12, 2022 at 7:31 PM

is caused by a bug in the report generation mechanism. First, we find all refunds from startDate to endDate. These refunds are the "rows" of the future report, so we put them in the report context. Then, we find all payments, transfers AND REFUNDS (again) of all fees/fines (accounts) associated with the refunds we found in step 1. Then we process these actions one by one, generating a report row every time we see a refund. The problem here is that we could have found MORE refunds on step 2 (because a fee/fine can have multiple refunds and some of them could have happened before startDate) but we still depend on the initial list of refunds that we found on step 1:

ctx.refunds is our initial list of refunds. In this refund caused the issue:

If we run a report with startDate of 2022-03-29 it'll succeed. But it'll fail with startDate of 2022-04-01 because there were other refunds for the same fee/fine on 2022-04-06.

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Vega

Release

Morning Glory (R2 2022)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 29, 2022 at 1:54 PM
Updated May 13, 2022 at 2:19 PM
Resolved May 13, 2022 at 2:19 PM
TestRail: Cases
TestRail: Runs