43 |
43 |
def issue_add(issue, to_users, cc_users)
|
44 |
44 |
redmine_headers 'Project' => issue.project.identifier,
|
45 |
45 |
'Issue-Id' => issue.id,
|
|
46 |
'Issue-Tracker' => issue.tracker.name,
|
46 |
47 |
'Issue-Author' => issue.author.login
|
47 |
48 |
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
48 |
49 |
message_id issue
|
... | ... | |
53 |
54 |
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue)
|
54 |
55 |
mail :to => to_users,
|
55 |
56 |
:cc => cc_users,
|
56 |
|
:subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
|
|
57 |
:subject => "[#{issue.project.name} - ##{issue.id}] #{issue.subject}"
|
57 |
58 |
end
|
58 |
59 |
|
59 |
60 |
# Notifies users about a new issue
|
... | ... | |
70 |
71 |
issue = journal.journalized
|
71 |
72 |
redmine_headers 'Project' => issue.project.identifier,
|
72 |
73 |
'Issue-Id' => issue.id,
|
|
74 |
'Issue-Tracker' => issue.tracker.name,
|
73 |
75 |
'Issue-Author' => issue.author.login
|
74 |
76 |
redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
|
75 |
77 |
message_id journal
|
76 |
78 |
references issue
|
77 |
79 |
@author = journal.user
|
78 |
|
s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] "
|
79 |
|
s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
|
80 |
|
s << issue.subject
|
81 |
80 |
@issue = issue
|
82 |
81 |
@users = to_users + cc_users
|
83 |
82 |
@journal = journal
|
... | ... | |
85 |
84 |
@issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue, :anchor => "change-#{journal.id}")
|
86 |
85 |
mail :to => to_users,
|
87 |
86 |
:cc => cc_users,
|
88 |
|
:subject => s
|
|
87 |
:subject => "[#{issue.project.name} - ##{issue.id}] #{issue.subject}"
|
89 |
88 |
end
|
90 |
89 |
|
91 |
90 |
# Notifies users about an issue update
|
... | ... | |
429 |
428 |
end
|
430 |
429 |
if @references_objects
|
431 |
430 |
headers[:references] = @references_objects.collect {|o| "<#{self.class.references_for(o)}>"}.join(' ')
|
|
431 |
headers[:in_reply_to] = @references_objects.collect {|o| "<#{self.class.references_for(o)}>"}.join(' ')
|
432 |
432 |
end
|
433 |
433 |
|
434 |
434 |
m = if block_given?
|