field_map.rb 470 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::ObjectAttribute::FieldMap < Sequencer::Unit::Base
  3. prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
  4. skip_any_action
  5. optional :action
  6. uses :field_map, :model_class, :resource, :sanitized_name
  7. def process
  8. field_map[model_class.name] ||= {}
  9. field_map[model_class.name][ resource['key'] ] = sanitized_name
  10. end
  11. end