From a7b6ad9bb5ba4953134912c39f3de02b38c7b536 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 21 Sep 2015 20:42:06 +0000 Subject: [PATCH] Adds tracker name to Redmine issue link titles (#13946). git-svn-id: http://svn.redmine.org/redmine/trunk@14620 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 2 +- test/unit/helpers/application_helper_test.rb | 8 ++++---- test/unit/mailer_test.rb | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce6142050..096363a35 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -781,7 +781,7 @@ module ApplicationHelper link = link_to("##{oid}#{comment_suffix}", issue_url(issue, :only_path => only_path, :anchor => anchor), :class => issue.css_classes, - :title => "#{issue.subject.truncate(100)} (#{issue.status.name})") + :title => "#{issue.tracker.name}: #{issue.subject.truncate(100)} (#{issue.status.name})") end when 'document' if document = Document.visible.find_by_id(oid) diff --git a/test/unit/helpers/application_helper_test.rb b/test/unit/helpers/application_helper_test.rb index c33314fde..27c711dda 100644 --- a/test/unit/helpers/application_helper_test.rb +++ b/test/unit/helpers/application_helper_test.rb @@ -276,11 +276,11 @@ RAW def test_redmine_links issue_link = link_to('#3', {:controller => 'issues', :action => 'show', :id => 3}, - :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)') + :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)') note_link = link_to('#3-14', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'}, - :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)') + :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)') note_link2 = link_to('#3#note-14', {:controller => 'issues', :action => 'show', :id => 3, :anchor => 'note-14'}, - :class => Issue.find(3).css_classes, :title => 'Error 281 when updating a recipe (New)') + :class => Issue.find(3).css_classes, :title => 'Bug: Error 281 when updating a recipe (New)') revision_link = link_to('r1', {:controller => 'repositories', :action => 'revision', :id => 'ecookbook', :rev => 1}, :class => 'changeset', :title => 'My very first commit do not escaping #<>&') @@ -964,7 +964,7 @@ RAW result2 = link_to('#1', "/issues/1", :class => Issue.find(1).css_classes, - :title => "Cannot print recipes (New)") + :title => "Bug: Cannot print recipes (New)") expected = <<-EXPECTED

#{result1}

diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 0b985c171..f3742c2b5 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -56,7 +56,7 @@ class MailerTest < ActiveSupport::TestCase # link to a referenced ticket assert_select 'a[href=?][title=?]', 'https://mydomain.foo/issues/1', - "Cannot print recipes (New)", + "Bug: Cannot print recipes (New)", :text => '#1' # link to a changeset assert_select 'a[href=?][title=?]', @@ -97,7 +97,7 @@ class MailerTest < ActiveSupport::TestCase # link to a referenced ticket assert_select 'a[href=?][title=?]', 'http://mydomain.foo/rdm/issues/1', - "Cannot print recipes (New)", + "Bug: Cannot print recipes (New)", :text => '#1' # link to a changeset assert_select 'a[href=?][title=?]', @@ -167,7 +167,7 @@ class MailerTest < ActiveSupport::TestCase # link to a referenced ticket assert_select 'a[href=?][title=?]', 'http://mydomain.foo/rdm/issues/1', - "Cannot print recipes (New)", + "Bug: Cannot print recipes (New)", :text => '#1' # link to a changeset assert_select 'a[href=?][title=?]', -- 2.39.5