]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Issue status in the notify email's subject is the issue's old status, should...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 19 Apr 2009 08:33:56 +0000 (08:33 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 19 Apr 2009 08:33:56 +0000 (08:33 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2673 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/mailer.rb
test/functional/issues_controller_test.rb

index c011d9d2ae75276dad331eaa1ec1b4245458a5d5..992fd50c01ed05d58bd296fcfe32adbb6c43b845 100644 (file)
@@ -53,7 +53,7 @@ class Mailer < ActionMailer::Base
   #   issue_edit(journal) => tmail object
   #   Mailer.deliver_issue_edit(journal) => sends an email to issue recipients
   def issue_edit(journal)
-    issue = journal.journalized
+    issue = journal.journalized.reload
     redmine_headers 'Project' => issue.project.identifier,
                     'Issue-Id' => issue.id,
                     'Issue-Author' => issue.author.login
index 0df66abdbb6dcd8dc3e816a003697898c569f8e1..f562ac9c536cfc997cd6cdf83720301b90d78425 100644 (file)
@@ -696,6 +696,8 @@ class IssuesControllerTest < Test::Unit::TestCase
     
     mail = ActionMailer::Base.deliveries.last
     assert mail.body.include?("Status changed from New to Assigned")
+    # subject should contain the new status
+    assert mail.subject.include?("(#{ IssueStatus.find(2).name })")
   end
   
   def test_post_edit_with_note_only