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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
move deciding which custom field can be grouped by to order statements
Ivan Kuchinb886078e28f8
diff --git a/app/models/custom_field/order_statements.rb b/app/models/custom_field/order_statements.rbindex 435852ecb15..ef4da8fe948 100644--- a/app/models/custom_field/order_statements.rb+++ b/app/models/custom_field/order_statements.rb@@ -68,6 +68,8 @@ module CustomField::OrderStatements# which differ for multi-value select fields,# because in this case we do want the primary CV valuesdef group_by_statement+ return unless field_format.in?(%w[list date bool int])+return order_statement unless field_format == "list"if multi_value?diff --git a/app/models/queries/work_packages/selects/custom_field_select.rb b/app/models/queries/work_packages/selects/custom_field_select.rbindex b1c089ff825..5c6931cd6e4 100644--- a/app/models/queries/work_packages/selects/custom_field_select.rb+++ b/app/models/queries/work_packages/selects/custom_field_select.rb@@ -35,14 +35,10 @@ class Queries::WorkPackages::Selects::CustomFieldSelect < Queries::WorkPackages:@name = custom_field.column_name.to_sym@sortable = custom_field.order_statement || false@sortable_join = custom_field.order_join_statement || false- @groupable = groupable_custom_field?(custom_field) ? custom_field.group_by_statement || false : false+ @groupable = custom_field.group_by_statement || false@summable = summable_statementend- def groupable_custom_field?(custom_field)- %w(list date bool int).include?(custom_field.field_format)- end-def caption@cf.nameend