[Fix] milestone close timestamp (#8728) (#8730)

* BugFix: Update closed_date_unix colum on milestone table on close

* go fmt
pull/8756/head
6543 5 years ago committed by zeripath
parent 8caf05989f
commit 432f9dd1a3
  1. 6
      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
}

Loading…
Cancel
Save