20210428125300_issue_3523_new_operator.rb 548 B

123456789101112131415
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue3523NewOperator < ActiveRecord::Migration[5.2]
  3. def change
  4. return if !Setting.exists?(name: 'system_init_done')
  5. overview = Overview.find_by(link: 'all_escalated')
  6. return if !overview
  7. return if overview.condition['ticket.escalation_at'].blank?
  8. return if overview.condition['ticket.escalation_at'][:operator] != 'before (relative)'
  9. overview.condition['ticket.escalation_at'][:operator] = 'till (relative)'
  10. overview.save!
  11. end
  12. end