mirror of
https://github.com/redmine/redmine.git
synced 2026-03-09 14:10:47 +01:00
Merged r4040 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4114 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -198,11 +198,8 @@ class IssuesController < ApplicationController
|
||||
|
||||
def bulk_update
|
||||
@issues.sort!
|
||||
attributes = parse_params_for_bulk_issue_attributes(params)
|
||||
|
||||
attributes = (params[:issue] || {}).reject {|k,v| v.blank?}
|
||||
attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'}
|
||||
attributes[:custom_field_values].reject! {|k,v| v.blank?} if attributes[:custom_field_values]
|
||||
|
||||
unsaved_issue_ids = []
|
||||
@issues.each do |issue|
|
||||
issue.reload
|
||||
@@ -318,4 +315,11 @@ private
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
def parse_params_for_bulk_issue_attributes(params)
|
||||
attributes = (params[:issue] || {}).reject {|k,v| v.blank?}
|
||||
attributes.keys.each {|k| attributes[k] = '' if attributes[k] == 'none'}
|
||||
attributes[:custom_field_values].reject! {|k,v| v.blank?} if attributes[:custom_field_values]
|
||||
attributes
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user