]> source.dussan.org Git - redmine.git/commitdiff
Added support for saving a bulk edit. #1147
authorEric Davis <edavis@littlestreamsoftware.com>
Wed, 28 May 2008 00:06:39 +0000 (17:06 -0700)
committerEric Davis <edavis@littlestreamsoftware.com>
Thu, 24 Jul 2008 00:27:01 +0000 (17:27 -0700)
app/controllers/issues_controller.rb
lib/redmine/plugin.rb

index c8edd172669185b99c774191a00f2a5ad1534270..75b0c794500c74c3090402653b0ec26a9b9b9114 100644 (file)
@@ -223,7 +223,6 @@ class IssuesController < ApplicationController
       assigned_to = (params[:assigned_to_id].blank? || params[:assigned_to_id] == 'none') ? nil : User.find_by_id(params[:assigned_to_id])
       category = (params[:category_id].blank? || params[:category_id] == 'none') ? nil : @project.issue_categories.find_by_id(params[:category_id])
       fixed_version = (params[:fixed_version_id].blank? || params[:fixed_version_id] == 'none') ? nil : @project.versions.find_by_id(params[:fixed_version_id])
-      
       unsaved_issue_ids = []      
       @issues.each do |issue|
         journal = issue.init_journal(User.current, params[:notes])
@@ -234,6 +233,10 @@ class IssuesController < 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?
+        if Redmine::Plugin::Hook.hook_registered?(:issue_bulk_edit_save)
+          Redmine::Plugin::Hook.call_hook(:issue_bulk_edit_save, {:params => params, :issue => issue })
+        end
+
         # Don't save any change to the issue if the user is not authorized to apply the requested status
         if (status.nil? || (issue.status.new_status_allowed_to?(status, current_role, issue.tracker) && issue.status = status)) && issue.save
           # Send notification for each issue (if changed)
index 32ec29daee8848db4e796aafeada5f70dc36cbcf..88a3d525be92d84a1b6cfc5e62284ad704cc0bd1 100644 (file)
@@ -134,6 +134,7 @@ module Redmine #:nodoc:
         :issue_show => [],
         :issue_edit => [],
         :issue_bulk_edit => [],
+        :issue_bulk_edit_save => [],
         :issue_update => [],
         :project_member_list_header => [],
         :project_member_list_column_three => []