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

Backport #28897 by @lunny

Fix #28896

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
pull/28912/head
Giteabot 10 months ago committed by GitHub
parent fd1edb9d9d
commit b508813fe4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      modules/indexer/issues/db/options.go

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

Loading…
Cancel
Save