Repository navigation
fix(jira): do not overwrite newer issues with outdated epic responses - #9462
Open
Alexandrshy wants to merge 1 commit into
Open
Alexandrshy wants to merge 1 commit into
Alexandrshy wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pr-type/bug-fix,pr-type/feature-development, etc.Summary
extractIssuesandextractEpicswrite the same rows of_tool_jira_issues. An epic that matches the board filter is collected into_raw_jira_api_issuesbycollectIssuesand, while board issues refer to it byepic_key, into_raw_jira_api_epicsbycollectEpics. Once nothing refers to it, its last response in_raw_jira_api_epicsis no longer refreshed. In full-sync modeextractEpicsreplays every row of that table afterextractIssuesand saved it without comparingupdated, so the epic went back to the status, resolution, type and custom fields of that old response (details in #9461).With this PR
extractEpicsleaves the issue row alone when_tool_jira_issuesalready holds a more recently updated version of the issue:JiraIssuerecord of the outdated response is dropped. Its changelogs, comments, worklogs and other records are saved as before: they have their own ids, and an older response can be the only one that carries them (epics are excluded fromcollectIssueChangelogs).collectEpicsaftercollectIssues, behave as they did.extractIssuesand the extractor helper are not changed.TestEpicExtractorKeepsNewerIssue(e2e) covers an epic whose responses in_raw_jira_api_epicsare older than the one in_raw_jira_api_issues, an epic with a newer epic response, and an epic outside the board. It fails onmain(the first epic ends up with the status of its old epic response) and passes with this change.Does this close any open issues?
Closes #9461
Screenshots
N/A