mapping.rb 905 B

123456789101112131415161718192021222324252627
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Case::Mapping < Sequencer::Unit::Base
  3. include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
  4. uses :resource, :customer_id, :owner_id, :group_id, :organization_id, :priority_id, :state_id,
  5. :created_by_id, :updated_by_id, :type
  6. def process
  7. provide_mapped do
  8. {
  9. id: resource['id'],
  10. number: resource['id'],
  11. title: resource['subject'],
  12. owner_id: owner_id,
  13. group_id: group_id,
  14. customer_id: customer_id,
  15. organization_id: organization_id,
  16. priority_id: priority_id,
  17. state_id: state_id,
  18. type: type,
  19. updated_by_id: updated_by_id,
  20. created_by_id: created_by_id,
  21. }
  22. end
  23. end
  24. end