1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2024-12-02 08:51:43 +02:00

feat: Add status category constants

This commit is contained in:
Thibaut Rousseau 2018-06-25 18:35:15 +02:00
parent 52e8877e24
commit 6223ddd833
No known key found for this signature in database
GPG Key ID: BCA6444086610E3D
2 changed files with 19 additions and 10 deletions

View File

@ -270,16 +270,6 @@ type Status struct {
StatusCategory StatusCategory `json:"statusCategory" structs:"statusCategory"`
}
// StatusCategory represents the category a status belongs to.
// Those categories can be user defined in every JIRA instance.
type StatusCategory struct {
Self string `json:"self" structs:"self"`
ID int `json:"id" structs:"id"`
Name string `json:"name" structs:"name"`
Key string `json:"key" structs:"key"`
ColorName string `json:"colorName" structs:"colorName"`
}
// Progress represents the progress of a JIRA issue.
type Progress struct {
Progress int `json:"progress" structs:"progress"`

19
statuscategory.go Normal file
View File

@ -0,0 +1,19 @@
package jira
// StatusCategory represents the category a status belongs to.
// Those categories can be user defined in every JIRA instance.
type StatusCategory struct {
Self string `json:"self" structs:"self"`
ID int `json:"id" structs:"id"`
Name string `json:"name" structs:"name"`
Key string `json:"key" structs:"key"`
ColorName string `json:"colorName" structs:"colorName"`
}
// These constants are the keys of the default JIRA status categories
const (
StatusCategoryComplete = "done"
StatusCategoryInProgress = "indeterminate"
StatusCategoryToDo = "new"
StatusCategoryUndefined = "undefined"
)