Skip to content

Commit 2b6a4f4

Browse files
committed
Added project status attribute.
1 parent a710c6c commit 2b6a4f4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

project.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,24 @@ type Project struct {
2727
Name string `json:"name"`
2828
Identifier string `json:"identifier"`
2929
Description string `json:"description"`
30+
Status int `json:"status"`
3031
CreatedOn string `json:"created_on"`
3132
UpdatedOn string `json:"updated_on"`
3233
CustomFields []*CustomField `json:"custom_fields,omitempty"`
3334
}
3435

36+
func (p *Project) IsActive() bool {
37+
return p.Status == 1
38+
}
39+
40+
func (p *Project) IsClosed() bool {
41+
return p.Status == 5
42+
}
43+
44+
func (p *Project) IsArchived() bool {
45+
return p.Status == 9
46+
}
47+
3548
type ProjectsFilter struct {
3649
Filter
3750
}

0 commit comments

Comments
 (0)