Skip to content

fix(jira): keep changelog items that share a field in one history entry (#9057) - #9062

Open
mfrancisc wants to merge 2 commits into
apache:mainfrom
mfrancisc:upstream/fix-9057-jira-changelog-item-pk
Open

fix(jira): keep changelog items that share a field in one history entry (#9057)#9062
mfrancisc wants to merge 2 commits into
apache:mainfrom
mfrancisc:upstream/fix-9057-jira-changelog-item-pk

Conversation

@mfrancisc

Copy link
Copy Markdown
Contributor

Summary

  • Jira often emits multiple changelog items with the same field in one history entry (add/remove of Fix Version, Component, labels, etc.). _tool_jira_issue_changelog_items was keyed by (connection_id, changelog_id, field), so the extractor silently kept only one row.
  • Add a per-field item_index to the primary key. Indexes are assigned from item content (from/to values and strings), not JSON array order, so re-extract of the same changelog stays stable if Jira reshuffles items.
  • Domain issue_changelogs.id includes item_index. The migration rebuilds the PK, resets Jira extract/convert subtask state so the next pipeline re-extracts from existing raw JSON, and drops old domain rows that used the previous id format.

Fixes #9057

…ry (apache#9057)

Jira emits multiple items with the same field in one changelog (add/remove of components, fixVersions, labels). The old PK dropped all but one. Add a content-stable ItemIndex so both rows are stored and converted.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JiraIssueChangelogItems primary key collision when Jira reports multiple items with the same field in one changelog entry

1 participant