Skip to content

Commit 6c235f4

Browse files
GiteaBotkemzeb
andauthored
Perform Newest sort type correctly when sorting issues (#30644) (#30847)
Backport #30644 by kemzeb Should resolve #30642. Co-authored-by: Kemal Zebari <[email protected]>
1 parent 1389fa8 commit 6c235f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/indexer/issues/dboptions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
6868
searchOpt.Paginator = opts.Paginator
6969

7070
switch opts.SortType {
71-
case "":
71+
case "", "latest":
7272
searchOpt.SortBy = SortByCreatedDesc
7373
case "oldest":
7474
searchOpt.SortBy = SortByCreatedAsc
@@ -86,7 +86,7 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
8686
searchOpt.SortBy = SortByDeadlineDesc
8787
case "priority", "priorityrepo", "project-column-sorting":
8888
// Unsupported sort type for search
89-
searchOpt.SortBy = SortByUpdatedDesc
89+
fallthrough
9090
default:
9191
searchOpt.SortBy = SortByUpdatedDesc
9292
}

0 commit comments

Comments
 (0)