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

abeizn pushed a commit to branch release-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.19 by this push:
     new 067a4cbb6 fix(zentao): fix null started_date fields in sprints table 
(#6057)
067a4cbb6 is described below

commit 067a4cbb6062ce389e1027cdd6760efe80534e8b
Author: Lynwee <[email protected]>
AuthorDate: Tue Sep 12 12:21:22 2023 +0800

    fix(zentao): fix null started_date fields in sprints table (#6057)
---
 backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv | 2 +-
 backend/plugins/zentao/tasks/execution_convertor.go             | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv 
b/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
index 0270d8c14..db9071d0c 100644
--- a/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
+++ b/backend/plugins/zentao/e2e/snapshot_tables/execution_sprint.csv
@@ -5,5 +5,5 @@ zentao:ZentaoExecution:1:194,新建一个迭代,完成之后检查sprints表,h
 
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-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-07T00:00:00.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-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 85ab86426..41d80d3bb 100644
--- a/backend/plugins/zentao/tasks/execution_convertor.go
+++ b/backend/plugins/zentao/tasks/execution_convertor.go
@@ -93,15 +93,14 @@ func ConvertExecutions(taskCtx plugin.SubTaskContext) 
errors.Error {
                                Name:            toolExecution.Name,
                                Url:             
fmt.Sprintf("%s/execution-view-%d.html", homePage, toolExecution.Id),
                                Status:          domainStatus,
+                               StartedDate:     
toolExecution.RealBegan.ToNullableTime(),
                                EndedDate:       
toolExecution.PlanEnd.ToNullableTime(),
                                CompletedDate:   
toolExecution.ClosedDate.ToNullableTime(),
                                OriginalBoardID: 
projectIdGen.Generate(toolExecution.ConnectionId, data.Options.ProjectId),
                        }
 
-                       if domainStatus == `FUTURE` || domainStatus == `` {
+                       if sprint.StartedDate == nil {
                                sprint.StartedDate = 
toolExecution.PlanBegin.ToNullableTime()
-                       } else {
-                               sprint.StartedDate = 
toolExecution.RealBegan.ToNullableTime()
                        }
 
                        boardSprint := &ticket.BoardSprint{

Reply via email to