20201201000001_setting_add_sender_format_agent_name.rb 429 B

1234567891011121314
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class SettingAddSenderFormatAgentName < ActiveRecord::Migration[5.1]
  3. def up
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. setting = Setting.find_by(name: 'ticket_define_email_from')
  7. return if !setting
  8. setting.options[:form][0][:options][:AgentName] = 'Agent Name'
  9. setting.save!
  10. end
  11. end