20240202122403_issue5028_body_required.rb 425 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Issue5028BodyRequired < ActiveRecord::Migration[7.0]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. field = ObjectManager::Attribute.for_object('TicketArticle').find_by(name: 'body')
  7. field.screens['create_middle'] = { '-all-' => { 'null' => false } }
  8. field.save!
  9. end
  10. end