From fa4b6f294b16649f9c1c4c8dc9de4b01484d18d7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 22 Nov 2014 10:33:16 +0000 Subject: [PATCH] Merged r13556 (#13673). git-svn-id: http://svn.redmine.org/redmine/branches/2.6-stable@13628 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/queries_helper.rb | 2 ++ test/functional/issues_controller_test.rb | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 5699419b0..c27ccf1a5 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -97,6 +97,8 @@ module QueriesHelper link_to value, issue_path(issue) when :subject link_to value, issue_path(issue) + when :parent + value ? (value.visible? ? link_to_issue(value, :subject => false) : "##{value.id}") : '' when :description issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : '' when :done_ratio diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index db04fda28..a56658d8d 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -874,6 +874,17 @@ class IssuesControllerTest < ActionController::TestCase assert_equal 'application/pdf', response.content_type end + def test_index_with_parent_column + Issue.delete_all + parent = Issue.generate! + child = Issue.generate!(:parent_issue_id => parent.id) + + get :index, :c => %w(parent) + + assert_select 'td.parent', :text => "#{parent.tracker} ##{parent.id}" + assert_select 'td.parent a[title=?]', parent.subject + end + def test_index_send_html_if_query_is_invalid get :index, :f => ['start_date'], :op => {:start_date => '='} assert_equal 'text/html', @response.content_type -- 2.39.5