Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit dca375a

Browse files
confusedsushi6543wxiaoguang
authored
when sorting issues by nearest due date, issues without due date should be sorted ascending (#35267)
When sorting issues and pull requests by the nearest due date, the issues and PRs without a due date are currently sorted _descending_ by their creation date. This seems counter intuitive to me. When sorting by nearest due date I want to see the issues/PRs in the order they should be worked on. For issues/PRs without a due date that order should be first come first served rather than last come first served. This PR now changes the ordering of issues/PRs which don't have a due date to _ascending_ by their creation date. So that the oldest is shown first and the newest last. This now also makes the sort order nearest due date a true opposite to farthest due date. At farthest due date the newest is shown first and the oldest last. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
1 parent fe7883c commit dca375a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎models/issues/issue_search.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ func applySorts(sess *xorm.Session, sortType string, priorityRepoID int64) {
106106
"WHEN milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL THEN issue.deadline_unix " +
107107
"WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " +
108108
"ELSE issue.deadline_unix END ASC").
109-
Desc("issue.created_unix").
110-
Desc("issue.id")
109+
Asc("issue.created_unix").
110+
Asc("issue.id")
111111
case "farduedate":
112112
sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id").
113113
OrderBy("CASE " +

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /