mirror of
https://github.com/redmine/redmine.git
synced 2026-01-27 17:59:58 +01:00
Fix query grouping filter not working for custom field relations (#39714).
Patch Alexander Meindl. git-svn-id: https://svn.redmine.org/redmine/trunk@22478 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -26,15 +26,15 @@ module QueriesHelper
|
||||
ungrouped = []
|
||||
grouped = {label_string: [], label_date: [], label_time_tracking: [], label_attachment: []}
|
||||
query.available_filters.map do |field, field_options|
|
||||
if field =~ /^(.+)\./
|
||||
if /^cf_\d+\./.match?(field)
|
||||
group = (field_options[:through] || field_options[:field]).try(:name)
|
||||
elsif field =~ /^(.+)\./
|
||||
# association filters
|
||||
group = "field_#{$1}".to_sym
|
||||
elsif field_options[:type] == :relation
|
||||
group = :label_relations
|
||||
elsif field_options[:type] == :tree
|
||||
group = query.is_a?(IssueQuery) ? :label_relations : nil
|
||||
elsif /^cf_\d+\./.match?(field)
|
||||
group = (field_options[:through] || field_options[:field]).try(:name)
|
||||
elsif %w(member_of_group assigned_to_role).include?(field)
|
||||
group = :field_assigned_to
|
||||
elsif field_options[:type] == :date_past || field_options[:type] == :date
|
||||
|
||||
Reference in New Issue
Block a user