[PORT] Added default sorting milestones by name (gitea#27084)

Resolves https://github.com/go-gitea/gitea/issues/26996
Added default sorting for milestones by name.

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>

---

Conflict resolution: trivial, was due to the improvement made to 'the due
date sorting' strings.

(cherry picked from commit e8d4b7a8b198eca3b0bd117efb422d7d7cac93fe)
This commit is contained in:
Bartlomiej Komendarczuk 2024-07-16 10:08:54 +02:00 committed by Gusted
parent d405143919
commit 5e8a830505
No known key found for this signature in database
GPG key ID: FD821B732837125F
4 changed files with 6 additions and 1 deletions

View file

@ -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"
}
}