diff options
author | 6543 | 2019-10-29 04:11:24 +0100 |
---|---|---|
committer | zeripath | 2019-10-29 03:11:24 +0000 |
commit | 432f9dd1a321bedf533f5ce609aeee487eafb526 (patch) | |
tree | 303b6f6d29421c43d218a1df28911719fd4c9d1b | |
parent | 8caf05989f23fa235a6ec4b46ba3a1b8c56f3495 (diff) |
[Fix] milestone close timestamp (#8728) (#8730)
* BugFix: Update closed_date_unix colum on milestone table on close
* go fmt
-rw-r--r-- | models/issue_milestone.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/issue_milestone.go b/models/issue_milestone.go index 1587e5e34..df2f30fb3 100644 --- a/models/issue_milestone.go +++ b/models/issue_milestone.go @@ -306,7 +306,11 @@ func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error) { } m.IsClosed = isClosed - if _, err := sess.ID(m.ID).Cols("is_closed").Update(m); err != nil { + if isClosed { + m.ClosedDateUnix = timeutil.TimeStampNow() + } + + if _, err := sess.ID(m.ID).Cols("is_closed", "closed_date_unix").Update(m); err != nil { return err } |