You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by gi...@apache.org on 2023/09/11 08:44:11 UTC

[incubator-devlake] 01/01: fix: update started_date logic (#6049)

This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch release-v0.18-auto-cherry-pick-6049
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit 95143d0407506f858ba490b0d4e74d2a4926d0b2
Author: abeizn <zi...@merico.dev>
AuthorDate: Mon Sep 11 16:43:49 2023 +0800

    fix: update started_date logic (#6049)
---
 .../plugins/zentao/e2e/snapshot_tables/execution_sprint.csv    | 10 +++++-----
 backend/plugins/zentao/tasks/execution_convertor.go            |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv b/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
index 6af3c28f4..0270d8c14 100644
--- a/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
+++ b/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
@@ -1,9 +1,9 @@
 id,name,url,status,started_date,ended_date,completed_date,original_board_id
 zentao:ZentaoExecution:1:133,为长期项目创建一个迭代,https://zentao.demo.haogs.cn/execution-view-133.html,,2023-08-28T00:00:00.000+00:00,2023-09-08T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
-zentao:ZentaoExecution:1:193,为长期项目创建一个迭代,https://zentao.demo.haogs.cn/execution-view-193.html,ACTIVE,2023-08-28T11:03:02.000+00:00,2023-09-08T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
-zentao:ZentaoExecution:1:194,新建一个迭代,完成之后检查sprints表,https://zentao.demo.haogs.cn/execution-view-194.html,CLOSED,2023-08-29T07:34:43.000+00:00,2023-09-05T00:00:00.000+00:00,2023-08-29T08:04:13.000+00:00,zentao:ZentaoProject:1:192
-zentao:ZentaoExecution:1:266,新建迭代然后关闭,https://zentao.demo.haogs.cn/execution-view-266.html,CLOSED,2023-09-07T01:23:21.000+00:00,2023-09-13T00:00:00.000+00:00,2023-09-07T02:15:31.000+00:00,zentao:ZentaoProject:1:192
+zentao:ZentaoExecution:1:193,为长期项目创建一个迭代,https://zentao.demo.haogs.cn/execution-view-193.html,ACTIVE,2023-08-28T00:00:00.000+00:00,2023-09-08T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
+zentao:ZentaoExecution:1:194,新建一个迭代,完成之后检查sprints表,https://zentao.demo.haogs.cn/execution-view-194.html,CLOSED,2023-08-29T00:00:00.000+00:00,2023-09-05T00:00:00.000+00:00,2023-08-29T08:04:13.000+00:00,zentao:ZentaoProject:1:192
+zentao:ZentaoExecution:1:266,新建迭代然后关闭,https://zentao.demo.haogs.cn/execution-view-266.html,CLOSED,2023-09-07T00:00:00.000+00:00,2023-09-13T00:00:00.000+00:00,2023-09-07T02:15:31.000+00:00,zentao:ZentaoProject:1:192
 zentao:ZentaoExecution:1:267,建一个计划未来开始迭代,https://zentao.demo.haogs.cn/execution-view-267.html,FUTURE,2023-09-09T00:00:00.000+00:00,2023-09-22T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
 zentao:ZentaoExecution:1:268,起始-截止都是结束时间,https://zentao.demo.haogs.cn/execution-view-268.html,FUTURE,2023-09-04T00:00:00.000+00:00,2023-09-05T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
-zentao:ZentaoExecution:1:269,把迭代挂起,https://zentao.demo.haogs.cn/execution-view-269.html,SUSPENDED,2023-09-07T10:57:47.000+00:00,2023-09-20T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
-zentao:ZentaoExecution:1:270,流程扭转--挂起迭代2,https://zentao.demo.haogs.cn/execution-view-270.html,SUSPENDED,2023-09-07T11:00:28.000+00:00,2023-09-20T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
+zentao:ZentaoExecution:1:269,把迭代挂起,https://zentao.demo.haogs.cn/execution-view-269.html,SUSPENDED,,2023-09-20T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
+zentao:ZentaoExecution:1:270,流程扭转--挂起迭代2,https://zentao.demo.haogs.cn/execution-view-270.html,SUSPENDED,2023-09-07T00:00:00.000+00:00,2023-09-20T00:00:00.000+00:00,,zentao:ZentaoProject:1:192
diff --git a/backend/plugins/zentao/tasks/execution_convertor.go b/backend/plugins/zentao/tasks/execution_convertor.go
index 925a2df50..85ab86426 100644
--- a/backend/plugins/zentao/tasks/execution_convertor.go
+++ b/backend/plugins/zentao/tasks/execution_convertor.go
@@ -101,7 +101,7 @@ func ConvertExecutions(taskCtx plugin.SubTaskContext) errors.Error {
 			if domainStatus == `FUTURE` || domainStatus == `` {
 				sprint.StartedDate = toolExecution.PlanBegin.ToNullableTime()
 			} else {
-				sprint.StartedDate = toolExecution.OpenedDate.ToNullableTime()
+				sprint.StartedDate = toolExecution.RealBegan.ToNullableTime()
 			}
 
 			boardSprint := &ticket.BoardSprint{