diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-19 22:09:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-19 22:09:31 +0000 |
commit | a45622585279603ff5b336c78019812a7bef3d37 (patch) | |
tree | 107d9eef9951eaec761905c0869bd624628d7a0f /app | |
parent | 5f871e965746d6c3e3642d74a321516d13aa66dc (diff) | |
download | redmine-a45622585279603ff5b336c78019812a7bef3d37.tar.gz redmine-a45622585279603ff5b336c78019812a7bef3d37.zip |
Add email notification to IssuesController#edit.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1018 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 78bcf76a7..f202e9bba 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -96,7 +96,7 @@ class IssuesController < ApplicationController @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) } else begin - @issue.init_journal(User.current) + journal = @issue.init_journal(User.current) # Retrieve custom fields and values if params["custom_fields"] @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) } @@ -105,6 +105,7 @@ class IssuesController < ApplicationController @issue.attributes = params[:issue] if @issue.save flash[:notice] = l(:notice_successful_update) + Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated') redirect_to(params[:back_to] || {:action => 'show', :id => @issue}) end rescue ActiveRecord::StaleObjectError |