Prevent reporting mismatch for deleted records
What does this MR do and why?
Prevent reporting mismatch for deleted records
It could happen that while we compare an epic and the work item record to validate that they are in sync, that these records get deleted in the database. This could lead to false warnings for the mismatched attributes. Especially for attributes that are part of the epic record but are stored in a separate table on the work item.
For example:
- We load the epic and the work item record
- We start comparing attributes
- The epic and work item record gets deleted on the database
- We compare epic.start_date (which is still in memory) and query work_item_dates_sources which returns nothing.
- We report a mismatch, although the data no longer exists.
As a first step of preventing these false reports, we now only log mismatches when the record still exists in the database at the time of logging.
Related issue: #460630 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.