mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-09-10 17:01:26 +02:00
[Fix] milestone close timestamp (#8728)
* BugFix: Update closed_date_unix colum on milestone table on close * go fmt
This commit is contained in:
parent
c4bc5abda3
commit
c4f9d06855
|
@ -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…
Reference in a new issue