]> source.dussan.org Git - redmine.git/commitdiff
Default sorting on projects by id is not relevant (#29482).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Oct 2019 07:07:17 +0000 (07:07 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 26 Oct 2019 07:07:17 +0000 (07:07 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18865 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project_query.rb

index c0e0e92e7b91ff6a6bd9da746f85a61566949f63..25ee7a86148e36d5d9e1f8a04c473d236adc94b1 100644 (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(',')))