2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2019-08-08 08:15:39 +00:00
|
|
|
class Sequencer
|
|
|
|
class Unit
|
|
|
|
module Import
|
|
|
|
module Zendesk
|
|
|
|
module Ticket
|
|
|
|
module Skip
|
|
|
|
class Deleted < Sequencer::Unit::Base
|
|
|
|
|
|
|
|
uses :resource
|
|
|
|
provides :action
|
|
|
|
|
|
|
|
def process
|
|
|
|
return if resource.status != 'deleted'
|
|
|
|
|
2021-01-06 14:18:15 +00:00
|
|
|
logger.info { "Skipping. Zendesk Ticket ID '#{resource.id}' is in 'deleted' state." }
|
2019-08-08 08:15:39 +00:00
|
|
|
state.provide(:action, :skipped)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|