likyh commented on code in PR #4245:
URL:
https://github.com/apache/incubator-devlake/pull/4245#discussion_r1082362873
##########
backend/plugins/jira/tasks/worklog_collector.go:
##########
@@ -66,7 +66,9 @@ func CollectWorklogs(taskCtx plugin.SubTaskContext)
errors.Error {
dal.Groupby("i.issue_id, i.updated"),
}
incremental := collectorWithState.IsIncremental()
- if incremental {
+ if incremental && collectorWithState.LatestState.LatestSuccessStart !=
nil {
+ clauses = append(clauses, dal.Having("i.updated > ? AND
(i.updated > max(wl.issue_updated) OR max(wl.issue_updated) IS NULL)",
collectorWithState.LatestState.LatestSuccessStart))
Review Comment:
It looks like ` AND COUNT(wl.worklog_id) > 0` is necessary because maybe
issue updated but worklog is empty either.
--
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]