queue_factory.rb 468 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Import
  3. module OTRS
  4. module QueueFactory
  5. extend Import::Factory
  6. # rubocop:disable Style/ModuleFunction
  7. extend self
  8. # rubocop:enable Style/ModuleFunction
  9. # We need to sort the records by name, to avoid missing parent queues.
  10. def pre_import_hook(records, *_args)
  11. records.sort_by! { |record| record['Name'] }
  12. end
  13. end
  14. end
  15. end