trabajo-afectivo/lib/import/otrs/dynamic_field/multiselect.rb

24 lines
702 B
Ruby
Raw Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
module Import
module OTRS
class DynamicField
class Multiselect < Import::OTRS::DynamicField
def init_callback(dynamic_field)
@attribute_config.merge!(
data_type: 'select',
data_option: {
default: '',
multiple: true,
options: dynamic_field['Config']['PossibleValues'],
nulloption: dynamic_field['Config']['PossibleNone'] == '1',
null: true,
translate: dynamic_field['Config']['TranslatableValues'] == '1',
}
)
end
end
end
end
end