Default sorting on projects by id is not relevant (#29482).

git-svn-id: http://svn.redmine.org/redmine/trunk@18865 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2019-10-26 07:07:17 +00:00
parent 54701d0d89
commit 49222d01fb

View File

@@ -83,7 +83,7 @@ class ProjectQuery < Query
def results_scope(options={})
order_option = [group_by_sort_order, (options[:order] || sort_clause)].flatten.reject(&:blank?)
order_option << "#{Project.table_name}.id ASC"
order_option << "#{Project.table_name}.lft ASC"
scope = base_scope.
order(order_option).
joins(joins_for_order_statement(order_option.join(',')))