2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2021-05-28 14:00:43 +00:00
|
|
|
class Issue3567AutoAssignment < ActiveRecord::Migration[5.2]
|
|
|
|
def change
|
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
|
|
|
|
|
|
|
setting = Setting.get('ticket_auto_assignment_selector')
|
|
|
|
return if setting.blank?
|
|
|
|
return if setting['condition'].blank?
|
|
|
|
|
|
|
|
setting['condition'].each_key do |key|
|
|
|
|
next if !key.start_with?('article.')
|
|
|
|
|
|
|
|
setting['condition'].delete(key)
|
|
|
|
end
|
|
|
|
|
|
|
|
Setting.set('ticket_auto_assignment_selector', setting)
|
|
|
|
end
|
|
|
|
end
|