Skip to content

Commit

Permalink
fix: start date of sprint is empty (#8222)
Browse files Browse the repository at this point in the history
[Bug][Jira] start_date Field Empty in sprint Table After Upgrading DevLake from 0.21 to 1.0 with Jira Plugin #8221
  • Loading branch information
narrowizard authored Nov 26, 2024
1 parent 1dfb12d commit ab05664
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions backend/plugins/jira/e2e/sprint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{},
Expand Down
19 changes: 7 additions & 12 deletions backend/plugins/jira/tasks/apiv2models/sprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab05664

Please sign in to comment.