Project

General

Profile

Patch #9563 » redmine_global_per_tracker_proper_cc.patch

Alex Hornung, 2011-11-14 00:12

View differences:

app/models/mailer.rb Wed Nov 02 07:41:12 2011 +0000 → app/models/mailer.rb Sun Nov 13 22:52:21 2011 +0000
45 45
    message_id issue
46 46
    recipients issue.recipients
47 47
    cc(issue.watcher_recipients - @recipients)
48

  
49
    # Add per-tracker global CC
50
    cc << issue.tracker.mail_cc
51

  
48 52
    subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
49 53
    body :issue => issue,
50 54
         :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
......
68 72
    recipients issue.recipients
69 73
    # Watchers in cc
70 74
    cc(issue.watcher_recipients - @recipients)
75

  
76
    # Add per-tracker global CC
77
    cc << issue.tracker.mail_cc
78

  
71 79
    s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
72 80
    s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
73 81
    s << issue.subject
app/views/trackers/_form.rhtml Wed Nov 02 07:41:12 2011 +0000 → app/views/trackers/_form.rhtml Sun Nov 13 22:52:21 2011 +0000
4 4
<div class="box tabular">
5 5
<!--[form:tracker]-->
6 6
<p><%= f.text_field :name, :required => true %></p>
7
<p><%= f.text_field :mail_cc %></p>
7 8
<p><%= f.check_box :is_in_roadmap %></p>
8 9

  
9 10
<% if IssueCustomField.all.any? %>
config/locales/en.yml Wed Nov 02 07:41:12 2011 +0000 → config/locales/en.yml Sun Nov 13 22:52:21 2011 +0000
250 250
  field_is_public: Public
251 251
  field_parent: Subproject of
252 252
  field_is_in_roadmap: Issues displayed in roadmap
253
  field_mail_cc: CC Mail Address
253 254
  field_login: Login
254 255
  field_mail_notification: Email notifications
255 256
  field_admin: Administrator
/dev/null Thu Jan 01 00:00:00 1970 +0000 → db/migrate/20111113000000_add_mail_cc.rb Sun Nov 13 22:52:21 2011 +0000
1
class AddMailCc < ActiveRecord::Migration
2
  def self.up
3
    add_column :trackers, :mail_cc, :string, :default => ""
4
  end
5

  
6
  def self.down
7
    remove_column :trackers, :mail_cc
8
  end
9
end
(1-1/2)