You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by zh...@apache.org on 2022/09/29 03:41:41 UTC
[incubator-devlake] branch release-v0.12 updated: fix: overwrite startDate with the value of activatedDate
This is an automated email from the ASF dual-hosted git repository.
zhangliang2022 pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.12 by this push:
new 4423ef26 fix: overwrite startDate with the value of activatedDate
4423ef26 is described below
commit 4423ef267d367837c658b4c9530706b41492229f
Author: zhangliang <li...@merico.dev>
AuthorDate: Thu Sep 29 11:19:37 2022 +0800
fix: overwrite startDate with the value of activatedDate
---
plugins/jira/tasks/apiv2models/sprint.go | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/plugins/jira/tasks/apiv2models/sprint.go b/plugins/jira/tasks/apiv2models/sprint.go
index 814105e8..61542519 100644
--- a/plugins/jira/tasks/apiv2models/sprint.go
+++ b/plugins/jira/tasks/apiv2models/sprint.go
@@ -29,13 +29,14 @@ type Sprint struct {
State string `json:"state"`
Name string `json:"name"`
StartDate *time.Time `json:"startDate"`
+ ActivatedDate *time.Time `json:"activatedDate"`
EndDate *time.Time `json:"endDate"`
CompleteDate *time.Time `json:"completeDate"`
OriginBoardID uint64 `json:"originBoardId"`
}
func (s Sprint) ToToolLayer(connectionId uint64) *models.JiraSprint {
- return &models.JiraSprint{
+ sprint := &models.JiraSprint{
ConnectionId: connectionId,
SprintId: s.ID,
Self: s.Self,
@@ -46,4 +47,8 @@ func (s Sprint) ToToolLayer(connectionId uint64) *models.JiraSprint {
CompleteDate: s.CompleteDate,
OriginBoardID: s.OriginBoardID,
}
+ if s.ActivatedDate != nil {
+ sprint.StartDate = s.ActivatedDate
+ }
+ return sprint
}