diff --git a/issue.go b/issue.go index 604e285..d9675b7 100644 --- a/issue.go +++ b/issue.go @@ -101,6 +101,7 @@ type IssueFields struct { Subtasks []*Subtasks `json:"subtasks,omitempty" structs:"subtasks,omitempty"` Attachments []*Attachment `json:"attachment,omitempty" structs:"attachment,omitempty"` Epic *Epic `json:"epic,omitempty" structs:"epic,omitempty"` + Parent *Parent `json:"parent,omitempty" structs:"parent,omitempty"` Unknowns tcontainer.MarshalMap } @@ -261,6 +262,12 @@ type Progress struct { 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 type Time time.Time diff --git a/issue_test.go b/issue_test.go index 56a1bbf..3e28f36 100644 --- a/issue_test.go +++ b/issue_test.go @@ -636,7 +636,7 @@ func TestIssueFields_MarshalJSON_Success(t *testing.T) { } 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) } }