]> source.dussan.org Git - gitea.git/commitdiff
make sure milestone listing is consistent across board (#4987)
authorLanre Adelowo <adelowomailbox@gmail.com>
Fri, 28 Sep 2018 03:59:46 +0000 (04:59 +0100)
committerLauris BH <lauris@nix.lv>
Fri, 28 Sep 2018 03:59:46 +0000 (06:59 +0300)
models/issue_milestone.go

index 177984a1f1a9581387a47c952c4ac30408859b29..a84522a6d1a46a7bb0716e0a63db0aaee2c3fd4e 100644 (file)
@@ -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.