From 9a262a20c441090652b613b750d8fc062431a3fc Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 31 Jan 2023 11:10:18 +0800 Subject: [PATCH] =?UTF-8?q?issue=E4=B8=AD=E5=A2=9E=E5=8A=A0=E7=BD=AE?= =?UTF-8?q?=E9=A1=B6=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/issue.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/issue.go b/models/issue.go index 3ed49ce42..037a33308 100755 --- a/models/issue.go +++ b/models/issue.go @@ -70,6 +70,7 @@ type Issue struct { //block_chain Amount int64 IsTransformed bool `xorm:"INDEX NOT NULL DEFAULT false"` + StayTop int `xorm:"NOT NULL DEFAULT 0"` } var ( @@ -1116,6 +1117,7 @@ type IssuesOptions struct { // sortIssuesSession sort an issues-related session based on the provided // sortType string func sortIssuesSession(sess *xorm.Session, sortType string, priorityRepoID int64) { + sess.Desc("issue.stay_top") switch sortType { case "oldest": sess.Asc("issue.created_unix")