mirror of https://github.com/go-gitea/gitea.git
Backport #30644 by kemzeb Should resolve #30642. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
This commit is contained in:
parent
1389fa8a99
commit
6c235f4959
|
@ -68,7 +68,7 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
|
||||||
searchOpt.Paginator = opts.Paginator
|
searchOpt.Paginator = opts.Paginator
|
||||||
|
|
||||||
switch opts.SortType {
|
switch opts.SortType {
|
||||||
case "":
|
case "", "latest":
|
||||||
searchOpt.SortBy = SortByCreatedDesc
|
searchOpt.SortBy = SortByCreatedDesc
|
||||||
case "oldest":
|
case "oldest":
|
||||||
searchOpt.SortBy = SortByCreatedAsc
|
searchOpt.SortBy = SortByCreatedAsc
|
||||||
|
@ -86,7 +86,7 @@ func ToSearchOptions(keyword string, opts *issues_model.IssuesOptions) *SearchOp
|
||||||
searchOpt.SortBy = SortByDeadlineDesc
|
searchOpt.SortBy = SortByDeadlineDesc
|
||||||
case "priority", "priorityrepo", "project-column-sorting":
|
case "priority", "priorityrepo", "project-column-sorting":
|
||||||
// Unsupported sort type for search
|
// Unsupported sort type for search
|
||||||
searchOpt.SortBy = SortByUpdatedDesc
|
fallthrough
|
||||||
default:
|
default:
|
||||||
searchOpt.SortBy = SortByUpdatedDesc
|
searchOpt.SortBy = SortByUpdatedDesc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue