mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user