Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

fix order_by_name

ulfertsc638b0d8dc29
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 8b90125025a..f088d3ad8cd 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -105,7 +105,7 @@ class Principal < ApplicationRecord
end
def self.order_by_name
- order(User::USER_FORMATS_STRUCTURE[Setting.user_format].map(&:to_s))
+ order(User::USER_FORMATS_STRUCTURE[Setting.user_format].map { |format| "#{Principal.table_name}.#{format}" })
end
def self.me