20210528092410_issue_3567_auto_assignment.rb 547 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue3567AutoAssignment < ActiveRecord::Migration[5.2]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. setting = Setting.get('ticket_auto_assignment_selector')
  6. return if setting.blank?
  7. return if setting['condition'].blank?
  8. setting['condition'].each_key do |key|
  9. next if !key.start_with?('article.')
  10. setting['condition'].delete(key)
  11. end
  12. Setting.set('ticket_auto_assignment_selector', setting)
  13. end
  14. end