summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/issues_helper.rb4
-rw-r--r--app/views/issues/show.rhtml2
-rw-r--r--test/unit/helpers/issues_helper_test.rb6
3 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index e4d35c217..d47b6e7fe 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -54,6 +54,10 @@ module IssuesHelper
"<strong>#{@cached_label_assigned_to}</strong>: #{issue.assigned_to}<br />" +
"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
end
+
+ def issue_heading(issue)
+ h("#{issue.tracker} ##{issue.id}")
+ end
def render_issue_subject_with_tree(issue)
s = ''
diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
index 166c85e0d..9cdf3f64f 100644
--- a/app/views/issues/show.rhtml
+++ b/app/views/issues/show.rhtml
@@ -1,6 +1,6 @@
<%= render :partial => 'action_menu' %>
-<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
+<h2><%= issue_heading(@issue) %></h2>
<div class="<%= @issue.css_classes %> details">
<%= avatar(@issue.author, :size => "50") %>
diff --git a/test/unit/helpers/issues_helper_test.rb b/test/unit/helpers/issues_helper_test.rb
index 617cc1d60..dcb1aed85 100644
--- a/test/unit/helpers/issues_helper_test.rb
+++ b/test/unit/helpers/issues_helper_test.rb
@@ -1,5 +1,5 @@
# Redmine - project management software
-# Copyright (C) 2006-2010 Jean-Philippe Lang
+# Copyright (C) 2006-2011 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -43,6 +43,10 @@ class IssuesHelperTest < HelperTestCase
def request
@request ||= ActionController::TestRequest.new
end
+
+ def test_issue_heading
+ assert_equal "Bug #1", issue_heading(Issue.find(1))
+ end
context "IssuesHelper#show_detail" do
context "with no_html" do