You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "warren830 (via GitHub)" <gi...@apache.org> on 2023/02/22 14:54:53 UTC

[GitHub] [incubator-devlake] warren830 opened a new pull request, #4493: refactor(tapd): adopts timeAfter

warren830 opened a new pull request, #4493:
URL: https://github.com/apache/incubator-devlake/pull/4493

   ### Summary
   Adopts timeAfter
   
   ### Does this close any open issues?
   Part of https://github.com/apache/incubator-devlake/issues/4403
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh commented on a diff in pull request #4493: refactor(tapd): adopts timeAfter

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh commented on code in PR #4493:
URL: https://github.com/apache/incubator-devlake/pull/4493#discussion_r1115278392


##########
backend/plugins/tapd/tasks/story_bug_collector.go:
##########
@@ -47,8 +47,8 @@ func CollectStoryBugs(taskCtx plugin.SubTaskContext) errors.Error {
 		dal.From(&models.TapdStory{}),
 		dal.Where("_tool_tapd_stories.connection_id = ? and _tool_tapd_stories.workspace_id = ? ", data.Options.ConnectionId, data.Options.WorkspaceId),
 	}
-	if collectorWithState.CreatedDateAfter != nil {
-		clauses = append(clauses, dal.Where("created > ?", *collectorWithState.CreatedDateAfter))
+	if collectorWithState.TimeAfter != nil {

Review Comment:
   I don't think this is needed since the `Stories` has been filtered.
   



##########
backend/plugins/tapd/tasks/story_commit_collector.go:
##########
@@ -49,8 +49,8 @@ func CollectStoryCommits(taskCtx plugin.SubTaskContext) errors.Error {
 		dal.From(&models.TapdStory{}),
 		dal.Where("_tool_tapd_stories.connection_id = ? and _tool_tapd_stories.workspace_id = ? ", data.Options.ConnectionId, data.Options.WorkspaceId),
 	}
-	if collectorWithState.CreatedDateAfter != nil {
-		clauses = append(clauses, dal.Where("created > ?", *collectorWithState.CreatedDateAfter))
+	if collectorWithState.TimeAfter != nil {

Review Comment:
   Same as above



##########
backend/plugins/tapd/tasks/iteration_collector.go:
##########
@@ -52,10 +52,10 @@ func CollectIterations(taskCtx plugin.SubTaskContext) errors.Error {
 			query.Set("page", fmt.Sprintf("%v", reqData.Pager.Page))
 			query.Set("limit", fmt.Sprintf("%v", reqData.Pager.Size))
 			query.Set("order", "created asc")
-			if data.CreatedDateAfter != nil {
-				query.Set("created",
+			if data.TimeAfter != nil {
+				query.Set("modified",
 					fmt.Sprintf(">%s",
-						data.CreatedDateAfter.In(data.Options.CstZone).Format("2006-01-02")))
+						data.TimeAfter.In(data.Options.CstZone).Format("2006-01-02")))

Review Comment:
   Only `date`, no `time`? what an elegant API!!!



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake] klesh merged pull request #4493: refactor(tapd): adopts timeAfter

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh merged PR #4493:
URL: https://github.com/apache/incubator-devlake/pull/4493


-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org