field_map.rb 474 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Freshdesk::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['name'] ] = sanitized_name
  10. end
  11. end