mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08: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:
		@@ -63,8 +63,10 @@ func (m *Milestone) AfterLoad() {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m.DeadlineString = m.DeadlineUnix.Format("2006-01-02")
 | 
			
		||||
	if timeutil.TimeStampNow() >= m.DeadlineUnix {
 | 
			
		||||
		m.IsOverdue = true
 | 
			
		||||
	if m.IsClosed {
 | 
			
		||||
		m.IsOverdue = m.ClosedDateUnix >= m.DeadlineUnix
 | 
			
		||||
	} else {
 | 
			
		||||
		m.IsOverdue = timeutil.TimeStampNow() >= m.DeadlineUnix
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user