aboutsummaryrefslogtreecommitdiffstats
path: root/models/user
diff options
context:
space:
mode:
authorTyrone Yeh <siryeh@gmail.com>2022-07-15 00:00:10 +0800
committerGitHub <noreply@github.com>2022-07-14 18:00:10 +0200
commit931c02d1521b7b990f70a590c691b066dbc27d4d (patch)
tree7d83e905b7d09b90eb82768a0347867cbbb03d9f /models/user
parentf85bb6f70bb390ec04a296827ac0f2a078741a80 (diff)
downloadgitea-931c02d1521b7b990f70a590c691b066dbc27d4d.tar.gz
gitea-931c02d1521b7b990f70a590c691b066dbc27d4d.zip
Add order by for assignee no sort issue (#20053)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'models/user')
-rw-r--r--models/user/user.go7
1 files changed, 7 insertions, 0 deletions
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"
+}