diff options
author | Go MAEDA <maeda@farend.jp> | 2023-04-11 09:11:40 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-04-11 09:11:40 +0000 |
commit | 9546dfa5e3aac247db62ea3a0d8e09672ed8196b (patch) | |
tree | e6a8d55193cc05f4470836502ea13fd6abe7fef5 /app/helpers | |
parent | 87f3352d3a64e2b6a89aa7036852627eb3953e6f (diff) | |
download | redmine-9546dfa5e3aac247db62ea3a0d8e09672ed8196b.tar.gz redmine-9546dfa5e3aac247db62ea3a0d8e09672ed8196b.zip |
Add Parent task filter and column to Spent time (#37623).
Patch by Mizuki ISHIKAWA.
git-svn-id: https://svn.redmine.org/redmine/trunk@22177 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/queries_helper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 20dae6fd4..662e22ee8 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -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_options[:type] == :relation + if 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 field =~ /^(.+)\./ - # association filters - group = "field_#{$1}".to_sym elsif %w(member_of_group assigned_to_role).include?(field) group = :field_assigned_to elsif field_options[:type] == :date_past || field_options[:type] == :date @@ -256,7 +256,7 @@ module QueriesHelper link_to value, issue_path(item) when :subject link_to value, issue_path(item) - when :parent + when :parent, :'issue.parent' value ? (value.visible? ? link_to_issue(value, :subject => false) : "##{value.id}") : '' when :description item.description? ? content_tag('div', textilizable(item, :description), :class => "wiki") : '' |