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

inline version column as it is always and only name

Ivan Kuchind25bec9d5fd8
diff --git a/app/models/custom_field/order_statements.rb b/app/models/custom_field/order_statements.rb
index d073bff333d..0802bdccced 100644
--- a/app/models/custom_field/order_statements.rb
+++ b/app/models/custom_field/order_statements.rb
@@ -48,7 +48,7 @@ module CustomField::OrderStatements
when "user"
[order_by_user_sql]
when "version"
- [order_by_version_sql("name")]
+ [order_by_version_sql]
end
end
@@ -138,9 +138,9 @@ module CustomField::OrderStatements
SQL
end
- def order_by_version_sql(column)
+ def order_by_version_sql
<<-SQL
- (SELECT #{column} version_cv_#{column} FROM #{Version.quoted_table_name} cv_version
+ (SELECT cv_version.name FROM #{Version.quoted_table_name} cv_version
WHERE cv_version.id = #{select_custom_value_as_decimal}
LIMIT 1)
SQL