mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
milestone: create page
This commit is contained in:
@@ -640,6 +640,7 @@ type Milestone struct {
|
||||
Completeness int // Percentage(1-100).
|
||||
Deadline time.Time
|
||||
DeadlineString string `xorm:"-"`
|
||||
IsOverDue bool `xorm:"-"`
|
||||
ClosedDate time.Time
|
||||
}
|
||||
|
||||
@@ -651,6 +652,9 @@ func (m *Milestone) BeforeSet(colName string, val xorm.Cell) {
|
||||
}
|
||||
|
||||
m.DeadlineString = t.Format("2006-01-02")
|
||||
if time.Now().After(t) {
|
||||
m.IsOverDue = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user