Project

General

Profile

Notify email without status in subject

Added by Pavel Potcheptsov over 11 years ago

Status field in email cause broke email's chains by subject.
And bottom changes remove Status field from email subject.
But after applying it in 2.3.0 field Status still present in subject, why?

Index: app/models/mailer.rb
===================================================================
--- app/models/mailer.rb    (revision 11050)
+++ app/models/mailer.rb    (working copy)
@@ -45,7 +45,8 @@
     cc = issue.watcher_recipients - recipients
     mail :to => recipients,
       :cc => cc,
-      :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" 
+      #:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" 
+      :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] #{issue.subject}" 
   end

   # Builds a Mail::Message object used to email recipients of the edited issue.
@@ -66,7 +67,7 @@
     # Watchers in cc
     cc = journal.watcher_recipients - recipients
     s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] " 
-    s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
+    #s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
     s << issue.subject
     @issue = issue
     @journal = journal


Replies (3)

RE: Notify email without status in subject - Added by Renren Dong almost 11 years ago

Hi Pavel, Have you figure out a solution ?
I am having the same problem (changes that i made in mailer.rb just doesn;t work)

RE: Notify email without status in subject - Added by Pavel Potcheptsov almost 11 years ago

Hi, yes.
I have opened issue for this: http://www.redmine.org/issues/13656
But as I remember, I have had the original mailer.rb file and changed file in same directory with difference, that I have renamed original file in some way, so there were two files.
After deleting original file and restart server all thing have started to work as expected.
Hope this help.

    (1-3/3)