Feature #3760 » redmine-2770-hack-1.4.3.patch
app/controllers/issues_controller.rb | ||
---|---|---|
146 | 146 |
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue }) |
147 | 147 |
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads])) |
148 | 148 |
if @issue.save |
149 |
Mailer.deliver_issue_add(@issue) if Setting.notified_events.include?('issue_added') |
|
149 | 150 |
call_hook(:controller_issues_new_after_save, { :params => params, :issue => @issue}) |
150 | 151 |
respond_to do |format| |
151 | 152 |
format.html { |
app/models/issue_observer.rb | ||
---|---|---|
17 | 17 | |
18 | 18 |
class IssueObserver < ActiveRecord::Observer |
19 | 19 |
def after_create(issue) |
20 |
Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added') |
|
20 |
#Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added')
|
|
21 | 21 |
end |
22 | 22 |
end |
app/models/mail_handler.rb | ||
---|---|---|
167 | 167 |
add_watchers(issue) |
168 | 168 |
issue.save! |
169 | 169 |
add_attachments(issue) |
170 |
Mailer.deliver_issue_add(issue) if Setting.notified_events.include?('issue_added') |
|
170 | 171 |
logger.info "MailHandler: issue ##{issue.id} created by #{user}" if logger && logger.info |
171 | 172 |
issue |
172 | 173 |
end |