Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plugins/jira/tasks/issue_changelog_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ func CollectIssueChangelogs(taskCtx core.SubTaskContext) error {
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.Join("LEFT JOIN _tool_jira_issue_changelogs c ON (c.connection_id = i.connection_id AND c.issue_id = i.issue_id)"),
dal.Where(`i.updated > i.created AND bi.connection_id = ? AND bi.board_id = ? AND i.std_type != ? `, data.Options.ConnectionId, data.Options.BoardId, "Epic"),
dal.Where("i.updated > i.created AND bi.connection_id = ? AND bi.board_id = ? AND i.std_type != ? ", data.Options.ConnectionId, data.Options.BoardId, "Epic"),
dal.Groupby("i.issue_id, i.updated"),
dal.Having("i.updated > max(c.issue_updated) OR max(c.issue_updated) IS NULL"),
dal.Having("i.updated > max(c.issue_updated) OR (max(c.issue_updated) IS NULL AND COUNT(c.changelog_id) > 0)"),
}
// apply time range if any
since := data.Since
Expand Down
2 changes: 1 addition & 1 deletion plugins/jira/tasks/worklog_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func CollectWorklogs(taskCtx core.SubTaskContext) error {
dal.Join("LEFT JOIN _tool_jira_worklogs wl ON (wl.connection_id = i.connection_id AND wl.issue_id = i.issue_id)"),
dal.Where("i.updated > i.created AND bi.connection_id = ? AND bi.board_id = ? ", data.Options.ConnectionId, data.Options.BoardId),
dal.Groupby("i.issue_id, i.updated"),
dal.Having("i.updated > max(wl.issue_updated) OR max(wl.issue_updated) IS NULL"),
dal.Having("i.updated > max(wl.issue_updated) OR (max(wl.issue_updated) IS NULL AND COUNT(wl.worklog_id) > 0)"),
}
// apply time range if any
if since != nil {
Expand Down