]> source.dussan.org Git - redmine.git/commitdiff
Adds markings to emails generated by private comments (#12888).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 May 2013 17:24:23 +0000 (17:24 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 18 May 2013 17:24:23 +0000 (17:24 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11869 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/mailer/issue_edit.html.erb
app/views/mailer/issue_edit.text.erb
test/unit/mailer_test.rb

index 720cfea6942cc6bce8f0ab6cb43ba0deda8e48dc..3222519126f330e413c9a7f2d636bcb5f53e27d4 100644 (file)
@@ -1,3 +1,6 @@
+<% if @journal.private_notes? %>
+  (<%= l(:field_private_notes) %>)
+<% end %>
 <%= l(:text_issue_updated, :id => "##{@issue.id}", :author => h(@journal.user)) %>
 
 <ul>
index e0f10811b9fbc222fb85e8e2695cbb1985653f49..395f8f6264908718d4cdf985c260ae4217499cde 100644 (file)
@@ -1,4 +1,4 @@
-<%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
+<%= "(#{l(:field_private_notes)}) " if @journal.private_notes? -%><%= l(:text_issue_updated, :id => "##{@issue.id}", :author => @journal.user) %>
 
 <% details_to_strings(@journal.details, true).each do |string| -%>
 <%= string %>
index c1b6ba6ac976d472a58babe21d51930f9dbf5146..f66e5763ce28c8c8c7aabc01b6adde7f34269408 100644 (file)
@@ -361,6 +361,17 @@ class MailerTest < ActiveSupport::TestCase
     assert_not_include 'someone@foo.bar', ActionMailer::Base.deliveries.last.bcc.sort
   end
 
+  def test_issue_edit_should_mark_private_notes
+    journal = Journal.find(2)
+    journal.private_notes = true
+    journal.save!
+
+    with_settings :default_language => 'en' do
+      Mailer.issue_edit(journal).deliver
+    end
+    assert_mail_body_match '(Private notes)', last_email
+  end
+
   def test_document_added
     document = Document.find(1)
     valid_languages.each do |lang|