likyh commented on code in PR #4245:
URL:
https://github.com/apache/incubator-devlake/pull/4245#discussion_r1083238039
##########
backend/plugins/jira/tasks/issue_changelog_collector.go:
##########
@@ -75,7 +75,17 @@ func CollectIssueChangelogs(taskCtx plugin.SubTaskContext)
errors.Error {
}
incremental := collectorWithState.IsIncremental()
if incremental {
- clauses = append(clauses, dal.Having("i.updated >
max(c.issue_updated) OR (max(c.issue_updated) IS NULL AND
COUNT(c.changelog_id) > 0)"))
+ clauses = append(clauses, dal.Having("i.updated > ? AND
(i.updated > max(c.issue_updated) OR (max(c.issue_updated) IS NULL AND
COUNT(c.changelog_id) > 0))",
collectorWithState.LatestState.LatestSuccessStart))
+ } else {
+ /*
+ i.updated > max(rl.issue_updated) was deleted because
for non-incremental collection,
+ max(rl.issue_updated) will only be one of null, less or
equal to i.updated
+ so i.updated > max(rl.issue_updated) is always false.
Review Comment:
Hmmm. `i.updated` will `> max(rl.issue_updated)` when the issue updated and
is collected by IssueCollector.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]