warren830 commented on code in PR #4245:
URL: 
https://github.com/apache/incubator-devlake/pull/4245#discussion_r1082368966


##########
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))
+       } else {
                clauses = append(clauses, dal.Having("i.updated > 
max(wl.issue_updated) OR  (max(wl.issue_updated) IS NULL AND 
COUNT(wl.worklog_id) > 0)"))

Review Comment:
   This is old logic from v0.14, as we don't have enough time to test, so I 
kept that



-- 
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]

Reply via email to