diff options
author | guillep2k <18600385+guillep2k@users.noreply.github.com> | 2019-11-09 10:09:01 -0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-11-09 13:09:01 +0000 |
commit | a647a54a08fc78286ea6ded008ea368f43e7c2ca (patch) | |
tree | 7cd1cf3601077953599409fee837566fe8883c4c /models/issue.go | |
parent | 1f3ba6919d35cc37d1d2575a70927986392f12b5 (diff) | |
download | gitea-a647a54a08fc78286ea6ded008ea368f43e7c2ca.tar.gz gitea-a647a54a08fc78286ea6ded008ea368f43e7c2ca.zip |
Leave non-dated issues for last (#8871)
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index 1e9d973186..3893048533 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1075,7 +1075,8 @@ func sortIssuesSession(sess *xorm.Session, sortType string, priorityRepoID int64 case "priority": sess.Desc("issue.priority") case "nearduedate": - sess.Asc("issue.deadline_unix") + // 253370764800 is 01/01/9999 @ 12:00am (UTC) + sess.OrderBy("CASE WHEN issue.deadline_unix = 0 THEN 253370764800 ELSE issue.deadline_unix END ASC") case "farduedate": sess.Desc("issue.deadline_unix") case "priorityrepo": |