app/models/query/group_by.rb
# Returns the work package count by group or nil if query is not grouped
Returns the work package count by group or nil if query is not grouped
Returns the work package count by group or nil if query is not grouped
def groups_grouped_by_column
    WorkPackage
      .group(query.group_by_statement)
      .visible
      .includes(all_includes)
      .joins(all_filter_joins)
      .references(:statuses, :projects)
      .where(query.statement)
      .count
  rescue ActiveRecord::RecordNotFound
    { nil => work_package_count }
  end
def groups_grouped_by_column WorkPackage . group ( query . group_by_statement ) . visible . includes ( all_includes ) . joins ( all_filter_joins ) . references ( :statuses , :projects ) . where ( query . statement ) . count rescue ActiveRecord :: RecordNotFound { nil => work_package_count } end
Returns the work package count by group or nil if query is not grouped
Returns the work package count by group or nil if query is not grouped
# Rails will raise an (unexpected) RecordNotFound if there's only a nil group value