From e6d54d511d43cf2419a8572ca1432ec553df7d35 Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Fri, 28 Sep 2018 04:59:46 +0100 Subject: [PATCH] make sure milestone listing is consistent across board (#4987) --- models/issue_milestone.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/issue_milestone.go b/models/issue_milestone.go index 177984a1f1a95..a84522a6d1a46 100644 --- a/models/issue_milestone.go +++ b/models/issue_milestone.go @@ -181,7 +181,7 @@ func (milestones MilestoneList) getMilestoneIDs() []int64 { // GetMilestonesByRepoID returns all milestones of a repository. func GetMilestonesByRepoID(repoID int64) (MilestoneList, error) { miles := make([]*Milestone, 0, 10) - return miles, x.Where("repo_id = ?", repoID).Find(&miles) + return miles, x.Where("repo_id = ?", repoID).Asc("deadline_unix").Find(&miles) } // GetMilestones returns a list of milestones of given repository and status.