mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 05:52:43 +00:00
Fix overdue marking of closed issues and milestones (#14923)
Closed milestones and issues should only be marked overdue if they were closed after their deadline. Fix: #14536 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
09fe0abb32
commit
78b7529cd4
2 changed files with 7 additions and 2 deletions
|
@ -97,6 +97,9 @@ func (issue *Issue) loadTotalTimes(e Engine) (err error) {
|
|||
|
||||
// IsOverdue checks if the issue is overdue
|
||||
func (issue *Issue) IsOverdue() bool {
|
||||
if issue.IsClosed {
|
||||
return issue.ClosedUnix >= issue.DeadlineUnix
|
||||
}
|
||||
return timeutil.TimeStampNow() >= issue.DeadlineUnix
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue