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-04-29 15:34:27 +00:00
|
|
|
class Issue3523NewOperator < ActiveRecord::Migration[5.2]
|
|
|
|
def change
|
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
|
|
|
|
|
|
|
overview = Overview.find_by(link: 'all_escalated')
|
|
|
|
return if !overview
|
|
|
|
return if overview.condition['ticket.escalation_at'].blank?
|
|
|
|
return if overview.condition['ticket.escalation_at'][:operator] != 'before (relative)'
|
|
|
|
|
|
|
|
overview.condition['ticket.escalation_at'][:operator] = 'till (relative)'
|
|
|
|
overview.save!
|
|
|
|
end
|
|
|
|
end
|