summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-03-08 01:55:57 +0000
committerGitHub <noreply@github.com>2021-03-08 02:55:57 +0100
commit78b7529cd471eafefd555fe82b8dbb8b63dcd9f5 (patch)
tree51dca1a79b4dcb71c7895cc7ede7ca10e13ab307 /models/issue.go
parent09fe0abb32d9b171f1e4b7d75928dfe77735585b (diff)
downloadgitea-78b7529cd471eafefd555fe82b8dbb8b63dcd9f5.tar.gz
gitea-78b7529cd471eafefd555fe82b8dbb8b63dcd9f5.zip
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>
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go
index 7ca8391029..1b634ed9e8 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -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
}