20210428125300_issue_3523_new_operator.rb 471 B

12345678910111213
  1. class Issue3523NewOperator < ActiveRecord::Migration[5.2]
  2. def change
  3. return if !Setting.exists?(name: 'system_init_done')
  4. overview = Overview.find_by(link: 'all_escalated')
  5. return if !overview
  6. return if overview.condition['ticket.escalation_at'].blank?
  7. return if overview.condition['ticket.escalation_at'][:operator] != 'before (relative)'
  8. overview.condition['ticket.escalation_at'][:operator] = 'till (relative)'
  9. overview.save!
  10. end
  11. end