diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/issues_controller.rb | 11 | ||||
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index f8d982c12..5621fbbe8 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -420,7 +420,16 @@ private 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] + if custom = attributes[:custom_field_values] + custom.reject! {|k,v| v.blank?} + custom.keys.each do |k| + if custom[k].is_a?(Array) + custom[k] << '' if custom[k].delete('__none__') + else + custom[k] = '' if custom[k] == '__none__' + end + end + end attributes end end diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 7d1368fa8..5e63a5634 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -100,6 +100,7 @@ module CustomFieldsHelper when "list" options = [] options << [l(:label_no_change_option), ''] unless custom_field.multiple? + options << [l(:label_none), '__none__'] unless custom_field.is_required? options += custom_field.possible_values_options(projects) select_tag(field_name, options_for_select(options), :id => field_id, :multiple => custom_field.multiple?) |