1234567891011121314151617181920212223242526 |
- # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
- class Sequencer::Unit::Import::Kayako::Case::PriorityId < Sequencer::Unit::Common::Provider::Named
- uses :resource
- private
- def priority_id
- ::Ticket::Priority.select(:id).find_by(name: local).id
- end
- def local
- mapping.fetch(resource['priority']&.fetch('level'), mapping[nil])
- end
- def mapping
- {
- 1 => '1 low',
- nil => '2 normal',
- 2 => '2 normal',
- 3 => '3 high',
- 4 => '3 high',
- }.freeze
- end
- end
|