]> source.dussan.org Git - redmine.git/commitdiff
remove "del" tag from deleted issue relation (#1005)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 19 May 2013 02:09:49 +0000 (02:09 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 19 May 2013 02:09:49 +0000 (02:09 +0000)
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
test/unit/helpers/issues_helper_test.rb

index 04c40d98dab198e479ee17c6a157505ee66b54c7..0f65bb42e089afde9acc918df685eb85df039dee 100644 (file)
@@ -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])
index c775bc865c8cc07931a8ebcf4fe9edb56bfb7cb0..1c243d9046051f3a7c4480a74190ce6661603d09 100644 (file)
@@ -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{<strong>Precedes</strong> deleted \(<del><i><a href="/issues/1" class=".+">Bug #1</a>: Can&#x27;t print recipes</i></del>\)},
+    assert_match %r{<strong>Precedes</strong> deleted \(<i><a href="/issues/1" class=".+">Bug #1</a>: Can&#x27;t print recipes</i>\)},
                  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 "<strong>Precedes</strong> deleted (<del><i>Issue 9999</i></del>)", show_detail(detail, false)
+    assert_equal "<strong>Precedes</strong> deleted (<i>Issue 9999</i>)", show_detail(detail, false)
   end
 end