]> source.dussan.org Git - redmine.git/commitdiff
Adds a title to the issue link in the flash message.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 13 Aug 2012 14:04:00 +0000 (14:04 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 13 Aug 2012 14:04:00 +0000 (14:04 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10198 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/issues_controller.rb
test/functional/issues_controller_test.rb

index 40a192304b97dd2b365ec58dfb38df157bfa5bd5..e443fac55d3362e72f8cb9b1b5abf1db1df08043 100644 (file)
@@ -139,7 +139,7 @@ class IssuesController < ApplicationController
       respond_to do |format|
         format.html {
           render_attachment_warning_if_needed(@issue)
-          flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue)))
+          flash[:notice] = l(:notice_issue_successful_create, :id => view_context.link_to("##{@issue.id}", issue_path(@issue), :title => @issue.subject))
           redirect_to(params[:continue] ?  { :action => 'new', :project_id => @issue.project, :issue => {:tracker_id => @issue.tracker, :parent_issue_id => @issue.parent_issue_id}.reject {|k,v| v.nil?} } :
                       { :action => 'show', :id => @issue })
         }
index ee18dadb27c536ab4ac0b457b8c1ad565bd8d8c8..e1cbab072b931859b52134965b11f38356c6b9dd 100644 (file)
@@ -1722,7 +1722,7 @@ class IssuesControllerTest < ActionController::TestCase
     issue = Issue.first(:order => 'id DESC')
     assert_redirected_to :controller => 'issues', :action => 'new', :project_id => 'ecookbook', :issue => {:tracker_id => 3}
     assert_not_nil flash[:notice], "flash was not set"
-    assert flash[:notice].include?(%|<a href="/issues/#{issue.id}">##{issue.id}</a>|), "issue link not found in flash: #{flash[:notice]}"
+    assert_include %|<a href="/issues/#{issue.id}" title="This is first issue">##{issue.id}</a>|, flash[:notice], "issue link not found in the flash message"
   end
 
   def test_post_create_without_custom_fields_param