Project

General

Profile

Actions

Defect #13656

closed

Notify email - unable to make custom subject

Added by Pavel Potcheptsov over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I posted this question in forum early: http://www.redmine.org/boards/2/topics/37090?r=37137#message-37137
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

Than I made such line:

:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]" 

and restart RM and received email: [IT Help Desk - Task #11112] (Assigned) test issue

Actions

Also available in: Atom PDF