mirror of
https://github.com/strongdm/comply
synced 2024-11-22 15:44:55 +00:00
use Resolution field rather than Status
This commit is contained in:
parent
25f7156ac2
commit
f6c9f89792
@ -179,7 +179,7 @@ func toTicket(i *jira.Issue) *model.Ticket {
|
|||||||
t.Body = i.Fields.Summary
|
t.Body = i.Fields.Summary
|
||||||
createdAt := time.Time(i.Fields.Created)
|
createdAt := time.Time(i.Fields.Created)
|
||||||
t.CreatedAt = &createdAt
|
t.CreatedAt = &createdAt
|
||||||
t.State = toState(i.Fields.Status)
|
t.State = toState(i.Fields.Resolution)
|
||||||
|
|
||||||
for _, l := range i.Fields.Labels {
|
for _, l := range i.Fields.Labels {
|
||||||
t.SetBool(l)
|
t.SetBool(l)
|
||||||
@ -187,9 +187,12 @@ func toTicket(i *jira.Issue) *model.Ticket {
|
|||||||
return t
|
return t
|
||||||
}
|
}
|
||||||
|
|
||||||
func toState(status *jira.Status) model.TicketState {
|
func toState(status *jira.Resolution) model.TicketState {
|
||||||
|
if status == nil {
|
||||||
|
return model.Open
|
||||||
|
}
|
||||||
switch status.Name {
|
switch status.Name {
|
||||||
case "Closed":
|
case "Done":
|
||||||
return model.Closed
|
return model.Closed
|
||||||
}
|
}
|
||||||
return model.Open
|
return model.Open
|
||||||
|
Loading…
Reference in New Issue
Block a user