diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-11 17:20:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-10-11 17:20:23 +0000 |
commit | 7486125e6dc548262fc6b06054077ad561dcef0c (patch) | |
tree | 82ff7b753d6f0ac4a7a1021757faa4fa55f9bf84 /app | |
parent | ff2e0314009f086aeb69bab1dd4e10f2e3285dde (diff) | |
download | redmine-7486125e6dc548262fc6b06054077ad561dcef0c.tar.gz redmine-7486125e6dc548262fc6b06054077ad561dcef0c.zip |
Bulk editing:
* Fixed: Done ratio always set to 0 even if (No change) is selected
* Added mail notifications
git-svn-id: http://redmine.rubyforge.org/svn/trunk@826 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/projects_controller.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3419c58f0..5dba47a10 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -347,7 +347,7 @@ class ProjectsController < ApplicationController issues = @project.issues.find_all_by_id(params[:issue_ids]) unsaved_issue_ids = [] issues.each do |issue| - issue.init_journal(User.current, params[:notes]) + journal = issue.init_journal(User.current, params[:notes]) issue.priority = priority if priority issue.assigned_to = assigned_to if assigned_to issue.category = category if category @@ -355,7 +355,12 @@ class ProjectsController < ApplicationController issue.start_date = params[:start_date] unless params[:start_date].blank? issue.due_date = params[:due_date] unless params[:due_date].blank? issue.done_ratio = params[:done_ratio] unless params[:done_ratio].blank? - unsaved_issue_ids << issue.id unless issue.save + if issue.save + # Send notification for each issue (if changed) + Mailer.deliver_issue_edit(journal) if journal.details.any? && Setting.notified_events.include?('issue_updated') + else + unsaved_issue_ids << issue.id + end end if unsaved_issue_ids.empty? flash[:notice] = l(:notice_successful_update) unless issues.empty? |