Sorting issues by due date fails
Somehow, sorting issues by due date fails. There are tests for that, they did pass in !3614 (merged) but when I run them locally, they fail. And I got this error when sorting issues by due date either in the project's issues list or in the dashboard's issues list:
PG::InvalidColumnReference: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
LINE 1: ...opened')) AND "issues"."project_id" = 5 ORDER BY issues.due...
^
: SELECT DISTINCT "issues".* FROM "issues" WHERE "issues"."deleted_at" IS NULL AND ("issues"."state" IN ('opened','reopened')) AND "issues"."project_id" = 5 ORDER BY issues.due_date IS NULL, issues.due_date ASC LIMIT 20 OFFSET 0