diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 38d72bbc6..eac1103e5 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -421,7 +421,7 @@ module QueriesHelper end # Returns the query definition as hidden field tags - def query_as_hidden_field_tags(query) + def query_as_hidden_field_tags(query, with_block_columns: false) tags = hidden_field_tag("set_filter", "1", :id => nil) if query.filters.present? @@ -435,7 +435,9 @@ module QueriesHelper else tags << hidden_field_tag("f[]", "", :id => nil) end + ignored_block_columns = with_block_columns ? [] : query.block_columns.map(&:name) query.columns.each do |column| + next if ignored_block_columns.include? column.name tags << hidden_field_tag("c[]", column.name, :id => nil) end if query.totalable_names.present? diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 3e0d0cfe8..3fabc3837 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -42,7 +42,7 @@