summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/mailer.rb2
-rw-r--r--test/functional/issues_controller_test.rb2
2 files changed, 3 insertions, 1 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index c011d9d2a..992fd50c0 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -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
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index 0df66abdb..f562ac9c5 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -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