mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-06-27 00:21:07 +02:00
Merge branch 'dontrebootme-parent-issue'
* dontrebootme-parent-issue: Fixed unit test to provide more information about the failure Fixed structs tags of Parent struct Added Parent to issue fields
This commit is contained in:
7
issue.go
7
issue.go
@ -101,6 +101,7 @@ type IssueFields struct {
|
|||||||
Subtasks []*Subtasks `json:"subtasks,omitempty" structs:"subtasks,omitempty"`
|
Subtasks []*Subtasks `json:"subtasks,omitempty" structs:"subtasks,omitempty"`
|
||||||
Attachments []*Attachment `json:"attachment,omitempty" structs:"attachment,omitempty"`
|
Attachments []*Attachment `json:"attachment,omitempty" structs:"attachment,omitempty"`
|
||||||
Epic *Epic `json:"epic,omitempty" structs:"epic,omitempty"`
|
Epic *Epic `json:"epic,omitempty" structs:"epic,omitempty"`
|
||||||
|
Parent *Parent `json:"parent,omitempty" structs:"parent,omitempty"`
|
||||||
Unknowns tcontainer.MarshalMap
|
Unknowns tcontainer.MarshalMap
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,6 +262,12 @@ type Progress struct {
|
|||||||
Total int `json:"total" structs:"total"`
|
Total int `json:"total" structs:"total"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parent represents the parent of a JIRA issue, to be used with subtask issue types.
|
||||||
|
type Parent struct {
|
||||||
|
ID string `json:"id,omitempty" structs:"id"`
|
||||||
|
Key string `json:"key,omitempty" structs:"key"`
|
||||||
|
}
|
||||||
|
|
||||||
// Time represents the Time definition of JIRA as a time.Time of go
|
// Time represents the Time definition of JIRA as a time.Time of go
|
||||||
type Time time.Time
|
type Time time.Time
|
||||||
|
|
||||||
|
@ -636,7 +636,7 @@ func TestIssueFields_MarshalJSON_Success(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !reflect.DeepEqual(i, recieved) {
|
if !reflect.DeepEqual(i, recieved) {
|
||||||
t.Errorf("Recieved object different from expected")
|
t.Errorf("Recieved object different from expected. Expected %+v, recieved %+v", i, recieved)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user