diff --git a/models/issue.go b/models/issue.go index d4222b04a05..88e96e57060 100644 --- a/models/issue.go +++ b/models/issue.go @@ -329,6 +329,10 @@ func (issue *Issue) APIFormat() *api.Issue { Updated: issue.UpdatedUnix.AsTime(), } + if issue.ClosedUnix != 0 { + apiIssue.Closed = issue.ClosedUnix.AsTimePtr() + } + if issue.Milestone != nil { apiIssue.Milestone = issue.Milestone.APIFormat() }