summaryrefslogtreecommitdiffstats
path: root/models/issue_milestone.go
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2018-09-28 04:59:46 +0100
committerLauris BH <lauris@nix.lv>2018-09-28 06:59:46 +0300
commite6d54d511d43cf2419a8572ca1432ec553df7d35 (patch)
tree64b5e00a79e46a5b40b57b186a09490542ce8a7c /models/issue_milestone.go
parent31d54880598beb7fdc9832147521063292ae9c0c (diff)
downloadgitea-e6d54d511d43cf2419a8572ca1432ec553df7d35.tar.gz
gitea-e6d54d511d43cf2419a8572ca1432ec553df7d35.zip
make sure milestone listing is consistent across board (#4987)
Diffstat (limited to 'models/issue_milestone.go')
-rw-r--r--models/issue_milestone.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/issue_milestone.go b/models/issue_milestone.go
index 177984a1f1..a84522a6d1 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.