diff --git a/backend/plugins/jira/e2e/sprint_test.go b/backend/plugins/jira/e2e/sprint_test.go index 0b1ef8ce8c4..17509e5f238 100644 --- a/backend/plugins/jira/e2e/sprint_test.go +++ b/backend/plugins/jira/e2e/sprint_test.go @@ -44,6 +44,7 @@ func TestSprintDataFlow(t *testing.T) { // verify sprint extraction dataflowTester.FlushTabler(&models.JiraSprint{}) dataflowTester.FlushTabler(&models.JiraBoardSprint{}) + dataflowTester.FlushTabler(&models.JiraServerInfo{}) dataflowTester.Subtask(tasks.ExtractSprintsMeta, taskData) dataflowTester.VerifyTable( models.JiraSprint{}, diff --git a/backend/plugins/jira/tasks/apiv2models/sprint.go b/backend/plugins/jira/tasks/apiv2models/sprint.go index bdb0a26d2ee..2abcb57e5ae 100644 --- a/backend/plugins/jira/tasks/apiv2models/sprint.go +++ b/backend/plugins/jira/tasks/apiv2models/sprint.go @@ -37,22 +37,17 @@ type Sprint struct { func (s Sprint) ToToolLayer(connectionId uint64, isServer bool) *models.JiraSprint { sprint := &models.JiraSprint{ - ConnectionId: connectionId, - SprintId: s.ID, - Self: s.Self, - State: s.State, - Name: s.Name, - // StartDate: s.StartDate, + ConnectionId: connectionId, + SprintId: s.ID, + Self: s.Self, + State: s.State, + Name: s.Name, + StartDate: s.StartDate, EndDate: s.EndDate, CompleteDate: s.CompleteDate, OriginBoardID: s.OriginBoardID, } - // jira cloud - if !isServer { - sprint.StartDate = s.StartDate - } - // jira server - if isServer && s.ActivatedDate != nil { + if s.ActivatedDate != nil { sprint.StartDate = s.ActivatedDate } return sprint