diff --git a/issue.go b/issue.go index c44881b0..62e248cd 100644 --- a/issue.go +++ b/issue.go @@ -232,16 +232,24 @@ type IssueRenderedFields struct { // IssueType represents a type of a Jira issue. // Typical types are "Request", "Bug", "Story", ... type IssueType struct { - Self string `json:"self,omitempty" structs:"self,omitempty"` - ID string `json:"id,omitempty" structs:"id,omitempty"` - Description string `json:"description,omitempty" structs:"description,omitempty"` - IconURL string `json:"iconUrl,omitempty" structs:"iconUrl,omitempty"` - Name string `json:"name,omitempty" structs:"name,omitempty"` - Subtask bool `json:"subtask,omitempty" structs:"subtask,omitempty"` - AvatarID int `json:"avatarId,omitempty" structs:"avatarId,omitempty"` - HierarchyLevel *int `json:"hierarchyLevel,omitempty" structs:"hierarchyLevel,omitempty"` + Self string `json:"self,omitempty" structs:"self,omitempty"` + ID string `json:"id,omitempty" structs:"id,omitempty"` + Description string `json:"description,omitempty" structs:"description,omitempty"` + IconURL string `json:"iconUrl,omitempty" structs:"iconUrl,omitempty"` + Name string `json:"name,omitempty" structs:"name,omitempty"` + Subtask bool `json:"subtask,omitempty" structs:"subtask,omitempty"` + AvatarID int `json:"avatarId,omitempty" structs:"avatarId,omitempty"` + HierarchyLevel *IssueTypeHierarchyLevel `json:"hierarchyLevel,omitempty" structs:"hierarchyLevel,omitempty"` } +type IssueTypeHierarchyLevel = int + +const ( + IssueTypeHierarchyLevelEpic IssueTypeHierarchyLevel = 1 + IssueTypeHierarchyLevelTask IssueTypeHierarchyLevel = 0 + IssueTypeHierarchyLevelSubTask IssueTypeHierarchyLevel = -1 +) + // Watches represents a type of how many and which user are "observing" a Jira issue to track the status / updates. type Watches struct { Self string `json:"self,omitempty" structs:"self,omitempty"`