Skip to content

Commit

Permalink
Manage versions startDate
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Sellier authored and andygrunwald committed Oct 30, 2018
1 parent bbce4af commit 570a74b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Version struct {
ReleaseDate string `json:"releaseDate,omitempty" structs:"releaseDate,omitempty"`
UserReleaseDate string `json:"userReleaseDate,omitempty" structs:"userReleaseDate,omitempty"`
ProjectID int `json:"projectId,omitempty" structs:"projectId,omitempty"` // Unlike other IDs, this is returned as a number
StartDate string `json:"startDate,omitempty" structs:"startDate,omitempty"`
}

// Get gets version info from JIRA
Expand Down
3 changes: 3 additions & 0 deletions version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestVersionService_Get_Success(t *testing.T) {
"releaseDate": "2010-07-06",
"overdue": true,
"userReleaseDate": "6/Jul/2010",
"startDate" : "2010-07-01",
"projectId": 10000
}`)
})
Expand Down Expand Up @@ -63,6 +64,7 @@ func TestVersionService_Create(t *testing.T) {
Released: true,
ReleaseDate: "2010-07-06",
UserReleaseDate: "6/Jul/2010",
StartDate: "2018-07-01",
}

version, _, err := testClient.Version.Create(v)
Expand All @@ -87,6 +89,7 @@ func TestServiceService_Update(t *testing.T) {
"released": true,
"releaseDate": "2010-07-06",
"userReleaseDate": "6/Jul/2010",
"startDate" : "2010-07-01",
"project": "PXA",
"projectId": 10000
}`)
Expand Down

0 comments on commit 570a74b

Please sign in to comment.