]> source.dussan.org Git - redmine.git/commitdiff
Fixed that parent column should not include issue subject (#13673).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 4 Nov 2014 20:17:44 +0000 (20:17 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 4 Nov 2014 20:17:44 +0000 (20:17 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13556 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/queries_helper.rb
test/functional/issues_controller_test.rb

index 75867ac1226a5040559cf56ac6c99902306f996f..9f6c07b36a4ff170243322c29779e936b990155d 100644 (file)
@@ -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
index a95588cac4ca3dbdf44e2bedf68a737ded34adcb..a21a468f2eaaf6e660dc6a36ff114043f370b8c7 100644 (file)
@@ -854,6 +854,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