From e09580e12200b2179d60f162ca24e4957d8ad5b8 Mon Sep 17 00:00:00 2001 From: Alex Shulaev Date: Wed, 11 Nov 2026 11:57:36 +0000 Subject: [PATCH] fix(jira): collect full changelog for issues truncated by the search API --- backend/plugins/jira/tasks/issue_changelog_collector.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/plugins/jira/tasks/issue_changelog_collector.go b/backend/plugins/jira/tasks/issue_changelog_collector.go index dd4f836069b..1225196943c 100644 --- a/backend/plugins/jira/tasks/issue_changelog_collector.go +++ b/backend/plugins/jira/tasks/issue_changelog_collector.go @@ -37,6 +37,8 @@ var _ plugin.SubTaskEntryPoint = CollectIssueChangelogs const RAW_CHANGELOG_TABLE = "jira_api_issue_changelogs" +const searchApiChangelogLimit = 40 + var CollectIssueChangelogsMeta = plugin.SubTaskMeta{ Name: "collectIssueChangelogs", EntryPoint: CollectIssueChangelogs, @@ -69,7 +71,7 @@ func CollectIssueChangelogs(taskCtx plugin.SubTaskContext) errors.Error { dal.Select("i.issue_id AS issue_id, i.updated AS update_time"), dal.From("_tool_jira_board_issues bi"), dal.Join("LEFT JOIN _tool_jira_issues i ON (bi.connection_id = i.connection_id AND bi.issue_id = i.issue_id)"), - dal.Where("bi.connection_id=? and bi.board_id = ? AND i.std_type != ? and i.changelog_total > 100", data.Options.ConnectionId, data.Options.BoardId, "Epic"), + dal.Where("bi.connection_id=? and bi.board_id = ? AND i.std_type != ? and i.changelog_total > ?", data.Options.ConnectionId, data.Options.BoardId, "Epic", searchApiChangelogLimit), } if apiCollector.IsIncremental() && apiCollector.GetSince() != nil { clauses = append(clauses, dal.Where("i.updated > ?", apiCollector.GetSince()))