Skip to content

fix(jira): collect full changelog for issues truncated by the search API - #9377

Merged
klesh merged 2 commits into
apache:mainfrom
Alexandrshy:fix/jira-truncated-changelog
Nov 14, 2026
Merged

klesh merged 2 commits into
apache:mainfrom
Alexandrshy:fix/jira-truncated-changelog

Conversation

@Alexandrshy

Copy link
Copy Markdown
Contributor

Summary

Since #8931, Jira Cloud issues are collected via /rest/api/3/search/jql?expand=changelog, which embeds only the newest 40 changelog histories per issue (the agile endpoint used before returned up to 100). collectIssueChangelogs still fetched the full changelog only for issues with changelog_total > 100, so issues with 41–100 histories silently lost everything older than the newest 40, including their first status transitions.

This PR lowers the threshold to 40.

Does this close any open issues?

None.

Screenshots

N/A

Other Information

  • Verified locally with a throwaway test (not part of this PR) that runs the real extractIssues → collectIssueChangelogs → extractIssueChangelogs chain against a fake Jira Cloud server on MySQL 8.4. Before the fix, issues with 41, 60 and 100 histories kept 40; after it, all histories are stored, also on an incremental run. Issues with up to 40 or more than 100 histories, and epics, behave as before.
  • Jira plugin unit and e2e tests pass.
  • Extra cost: one API request per updated issue with 41–100 histories.
  • Histories lost before the fix come back after a one-off fullSync run of collectIssueChangelogs + extractIssueChangelogs.

@klesh klesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.
Thanks for your contribution.

@klesh
klesh merged commit e8d4451 into apache:main Nov 14, 2026
10 checks passed
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.

2 participants