diff --git a/models/issues/milestone_list.go b/models/issues/milestone_list.go
index d1b3f0301..955ab2356 100644
--- a/models/issues/milestone_list.go
+++ b/models/issues/milestone_list.go
@@ -70,8 +70,10 @@ func (opts FindMilestoneOptions) ToOrders() string {
return "num_issues DESC"
case "id":
return "id ASC"
+ case "name":
+ return "name DESC"
default:
- return "deadline_unix ASC, id ASC"
+ return "deadline_unix ASC, name ASC"
}
}
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index 4da9a9afd..2c34025be 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -1996,6 +1996,7 @@ milestones.edit_success = Milestone "%s" has been updated.
milestones.deletion = Delete milestone
milestones.deletion_desc = Deleting a milestone removes it from all related issues. Continue?
milestones.deletion_success = The milestone has been deleted.
+milestones.filter_sort.name = Name
milestones.filter_sort.earliest_due_data = Nearest due date
milestones.filter_sort.latest_due_date = Farthest due date
milestones.filter_sort.least_complete = Least complete
diff --git a/templates/repo/issue/milestone/filter_list.tmpl b/templates/repo/issue/milestone/filter_list.tmpl
index ecfb95bb1..fe6e1a221 100644
--- a/templates/repo/issue/milestone/filter_list.tmpl
+++ b/templates/repo/issue/milestone/filter_list.tmpl
@@ -11,5 +11,6 @@
{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}
{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}
{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}
+ {{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}
diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl
index 0f1e866a2..71ff8dba3 100644
--- a/templates/user/dashboard/milestones.tmpl
+++ b/templates/user/dashboard/milestones.tmpl
@@ -65,6 +65,7 @@
{{ctx.Locale.Tr "repo.milestones.filter_sort.most_complete"}}
{{ctx.Locale.Tr "repo.milestones.filter_sort.most_issues"}}
{{ctx.Locale.Tr "repo.milestones.filter_sort.least_issues"}}
+ {{ctx.Locale.Tr "repo.milestones.filter_sort.name"}}