From 931c02d1521b7b990f70a590c691b066dbc27d4d Mon Sep 17 00:00:00 2001 From: Tyrone Yeh Date: Fri, 15 Jul 2022 00:00:10 +0800 Subject: Add order by for assignee no sort issue (#20053) Co-authored-by: wxiaoguang --- models/user/user.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'models/user') diff --git a/models/user/user.go b/models/user/user.go index 125c643f3e..fbd8df9472 100644 --- a/models/user/user.go +++ b/models/user/user.go @@ -1314,3 +1314,10 @@ func IsUserVisibleToViewer(ctx context.Context, u, viewer *User) bool { } return false } + +func GetOrderByName() string { + if setting.UI.DefaultShowFullName { + return "full_name, name" + } + return "name" +} -- cgit v1.2.3