Merged r15532 to r15534 (#23054).

git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@15537 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2016-06-18 06:01:43 +00:00
parent 446b3bfaca
commit 89cfe130fc
4 changed files with 27 additions and 25 deletions

View File

@@ -174,7 +174,7 @@ class TimelogController < ApplicationController
end
def bulk_update
attributes = parse_params_for_bulk_time_entry_attributes(params)
attributes = parse_params_for_bulk_update(params[:time_entry])
unsaved_time_entry_ids = []
@time_entries.each do |time_entry|
@@ -271,11 +271,4 @@ private
end
scope
end
def parse_params_for_bulk_time_entry_attributes(params)
attributes = (params[:time_entry] || {}).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