Fix sort bug on repository issues list (#28897) (#28901)

Backport #28897 by @lunny

Fix #28896

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
(cherry picked from commit b508813fe4)
This commit is contained in:
Giteabot 2024-01-23 15:00:52 +08:00 committed by Earl Warren
parent 9a1fb689a4
commit 1cb29ff6a2
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -38,7 +38,7 @@ func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_m
sortType = "leastupdate" sortType = "leastupdate"
case internal.SortByCommentsAsc: case internal.SortByCommentsAsc:
sortType = "leastcomment" sortType = "leastcomment"
case internal.SortByDeadlineAsc: case internal.SortByDeadlineDesc:
sortType = "farduedate" sortType = "farduedate"
case internal.SortByCreatedDesc: case internal.SortByCreatedDesc:
sortType = "newest" sortType = "newest"
@ -46,7 +46,7 @@ func ToDBOptions(ctx context.Context, options *internal.SearchOptions) (*issue_m
sortType = "recentupdate" sortType = "recentupdate"
case internal.SortByCommentsDesc: case internal.SortByCommentsDesc:
sortType = "mostcomment" sortType = "mostcomment"
case internal.SortByDeadlineDesc: case internal.SortByDeadlineAsc:
sortType = "nearduedate" sortType = "nearduedate"
default: default:
sortType = "newest" sortType = "newest"