From b3a6555b3093d999a91ef919bc2e92ef5a3f9c92 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 19 May 2013 02:09:49 +0000 Subject: [PATCH] remove "del" tag from deleted issue relation (#1005) It is confused with deleted issue. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11886 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 4 +++- test/unit/helpers/issues_helper_test.rb | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 04c40d98d..0f65bb42e 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -328,7 +328,9 @@ module IssuesHelper unless no_html label = content_tag('strong', label) old_value = content_tag("i", h(old_value)) if detail.old_value - old_value = content_tag("del", old_value) if detail.old_value and detail.value.blank? + if detail.old_value && detail.value.blank? && detail.property != 'relation' + old_value = content_tag("del", old_value) + end if detail.property == 'attachment' && !value.blank? && atta = Attachment.find_by_id(detail.prop_key) # Link to the attachment if it has not been removed value = link_to_attachment(atta, :download => true, :only_path => options[:only_path]) diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb index c775bc865..1c243d904 100644 --- a/test/unit/helpers/issues_helper_test.rb +++ b/test/unit/helpers/issues_helper_test.rb @@ -232,7 +232,7 @@ class IssuesHelperTest < ActionView::TestCase :prop_key => 'label_precedes', :old_value => 1) assert_equal "Precedes deleted (Bug #1: Can't print recipes)", show_detail(detail, true) - assert_match %r{Precedes deleted \(Bug #1: Can't print recipes\)}, + assert_match %r{Precedes deleted \(Bug #1: Can't print recipes\)}, show_detail(detail, false) non_existed_issue_number = 9999 assert_nil Issue.find_by_id(non_existed_issue_number) @@ -240,6 +240,6 @@ class IssuesHelperTest < ActionView::TestCase :prop_key => 'label_precedes', :old_value => non_existed_issue_number) assert_equal "Precedes deleted (Issue 9999)", show_detail(detail, true) - assert_equal "Precedes deleted (Issue 9999)", show_detail(detail, false) + assert_equal "Precedes deleted (Issue 9999)", show_detail(detail, false) end end