mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-05 23:34:19 -04:00
* [Fix] milestone close timestamp (#8728) * BugFix: Update closed_date_unix colum on milestone table on close * use go standart time lib * make backport work!
This commit is contained in:
parent
b2c3a7d79f
commit
9614bb1b9f
@ -6,6 +6,7 @@ package models
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
"code.gitea.io/gitea/modules/log"
|
"code.gitea.io/gitea/modules/log"
|
||||||
"code.gitea.io/gitea/modules/setting"
|
"code.gitea.io/gitea/modules/setting"
|
||||||
@ -290,6 +291,10 @@ func ChangeMilestoneStatus(m *Milestone, isClosed bool) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
m.IsClosed = isClosed
|
m.IsClosed = isClosed
|
||||||
|
if isClosed {
|
||||||
|
m.ClosedDateUnix = util.TimeStamp(time.Now().Unix())
|
||||||
|
}
|
||||||
|
|
||||||
if err = updateMilestone(sess, m); err != nil {
|
if err = updateMilestone(sess, m); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user