diff --git a/board.go b/board.go index 890d6e0a..1f457582 100644 --- a/board.go +++ b/board.go @@ -73,6 +73,7 @@ type Sprint struct { OriginBoardID int `json:"originBoardId" structs:"originBoardId"` Self string `json:"self" structs:"self"` State string `json:"state" structs:"state"` + Goal string `json:"goal,omitempty" structs:"goal"` } // BoardConfiguration represents a boardConfiguration of a jira board diff --git a/board_test.go b/board_test.go index 11a5dc2d..1fd64847 100644 --- a/board_test.go +++ b/board_test.go @@ -181,8 +181,8 @@ func TestBoardService_GetAllSprints(t *testing.T) { t.Error("Expected sprint list. Got nil.") } - if len(sprints) != 4 { - t.Errorf("Expected 4 transitions. Got %d", len(sprints)) + if len(sprints) != 6 { + t.Errorf("Expected 6 transitions. Got %d", len(sprints)) } } diff --git a/mocks/sprints.json b/mocks/sprints.json index 508ca35b..ad57cb82 100644 --- a/mocks/sprints.json +++ b/mocks/sprints.json @@ -41,6 +41,21 @@ "self": "https://jira.com/rest/agile/1.0/sprint/832", "startDate": "2016-06-20T13:24:39.161-07:00", "state": "active" + }, + { + "id": 845, + "self":"https://jira.com/rest/agile/1.0/sprint/845", + "state": "future", + "name": "Minimal Example Sprint", + "originBoardId": 734 + }, + { + "id": 846, + "self": "https://jira.com/rest/agile/1.0/sprint/846", + "state": "future", + "name": "Sprint with a Goal", + "originBoardId": 734, + "goal": "My Goal" } ] }