summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-06 16:22:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-06-06 16:22:18 +0000
commitd90f46a5da07a4945751bd4b65d6754a8f475b91 (patch)
tree1c2aad49ac9fdafcb8cf487f2f055fac405b0ee7
parent019f57e5c71e96b80b2fb1abc49c9fe4df50c705 (diff)
downloadredmine-d90f46a5da07a4945751bd4b65d6754a8f475b91.tar.gz
redmine-d90f46a5da07a4945751bd4b65d6754a8f475b91.zip
Prepends issue numbers with a number sign (#1005).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11940 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/issues_helper.rb4
-rw-r--r--test/unit/helpers/issues_helper_test.rb16
2 files changed, 10 insertions, 10 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index d51c9cb65..05090c7b3 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -309,11 +309,11 @@ module IssuesHelper
when 'relation'
if detail.value && !detail.old_value
rel_issue = Issue.visible.find_by_id(detail.value)
- value = rel_issue.nil? ? "#{l(:label_issue)} #{detail.value}" :
+ value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" :
(no_html ? rel_issue : link_to_issue(rel_issue))
elsif detail.old_value && !detail.value
rel_issue = Issue.visible.find_by_id(detail.old_value)
- old_value = rel_issue.nil? ? "#{l(:label_issue)} #{detail.old_value}" :
+ old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" :
(no_html ? rel_issue : link_to_issue(rel_issue))
end
label = l(detail.prop_key.to_sym)
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index b49410f54..edf66b732 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -223,8 +223,8 @@ class IssuesHelperTest < ActionView::TestCase
detail = JournalDetail.new(:property => 'relation',
:prop_key => 'label_precedes',
:value => non_existed_issue_number)
- assert_equal "Precedes Issue #{non_existed_issue_number} added", show_detail(detail, true)
- assert_equal "<strong>Precedes</strong> <i>Issue #{non_existed_issue_number}</i> added", show_detail(detail, false)
+ assert_equal "Precedes Issue ##{non_existed_issue_number} added", show_detail(detail, true)
+ assert_equal "<strong>Precedes</strong> <i>Issue ##{non_existed_issue_number}</i> added", show_detail(detail, false)
end
def test_show_detail_relation_added_should_not_disclose_issue_that_is_not_visible
@@ -233,8 +233,8 @@ class IssuesHelperTest < ActionView::TestCase
:prop_key => 'label_precedes',
:value => issue.id)
- assert_equal "Precedes Issue #{issue.id} added", show_detail(detail, true)
- assert_equal "<strong>Precedes</strong> <i>Issue #{issue.id}</i> added", show_detail(detail, false)
+ assert_equal "Precedes Issue ##{issue.id} added", show_detail(detail, true)
+ assert_equal "<strong>Precedes</strong> <i>Issue ##{issue.id}</i> added", show_detail(detail, false)
end
def test_show_detail_delete_relation
@@ -249,8 +249,8 @@ class IssuesHelperTest < ActionView::TestCase
detail = JournalDetail.new(:property => 'relation',
: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 (<i>Issue 9999</i>)", show_detail(detail, false)
+ assert_equal "Precedes deleted (Issue #9999)", show_detail(detail, true)
+ assert_equal "<strong>Precedes</strong> deleted (<i>Issue #9999</i>)", show_detail(detail, false)
end
def test_show_detail_relation_deleted_should_not_disclose_issue_that_is_not_visible
@@ -259,7 +259,7 @@ class IssuesHelperTest < ActionView::TestCase
:prop_key => 'label_precedes',
:old_value => issue.id)
- assert_equal "Precedes deleted (Issue #{issue.id})", show_detail(detail, true)
- assert_equal "<strong>Precedes</strong> deleted (<i>Issue #{issue.id}</i>)", show_detail(detail, false)
+ assert_equal "Precedes deleted (Issue ##{issue.id})", show_detail(detail, true)
+ assert_equal "<strong>Precedes</strong> deleted (<i>Issue ##{issue.id}</i>)", show_detail(detail, false)
end
end