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

Address CR comments

Dombi Attila1f3913706c75
diff --git a/app/models/query/results/group_by.rb b/app/models/query/results/group_by.rb
index db73d333321..db8caa22c4a 100644
--- a/app/models/query/results/group_by.rb
+++ b/app/models/query/results/group_by.rb
@@ -163,7 +163,7 @@ module ::Query::Results::GroupBy
column = case_insensitive_condition(sortable, column, columns_hash)
if order
- column.to_s + " #{order} "
+ "#{column} #{order}"
else
column
end
diff --git a/config/environments/test.rb b/config/environments/test.rb
index bf3f4497e10..aafe1499fe6 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -41,13 +41,14 @@ Rails.application.configure do
# Spring requires to have the classes reloaded. On the CI or when Spring is
# disabled, it does not need to happen.
- config.enable_reloading = !(ENV['CI'].present? || ENV['DISABLE_SPRING'].present?)
+
+ config.enable_reloading = %w[CI DISABLE_SPRING].none? { |name| ENV[name].present? }
# Eager loading loads your entire application. When running a single test locally,
# this is usually not necessary, and can slow down your test suite. However, it's
# recommended that you enable it in continuous integration systems to ensure eager
# loading is working properly before deploying your code.
- config.eager_load = ENV['CI'].present? || ENV['EAGER_LOAD'].present?
+ config.eager_load = %w[CI EAGER_LOAD].any? { |name| ENV[name].present? }
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true