20240718192329_rename_ticket_overview_priority_icon_setting.rb 990 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class RenameTicketOverviewPriorityIconSetting < 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. setting = Setting.find_by name: 'ui_ticket_overview_priority_icon'
  7. return if setting.blank?
  8. setting.update!(
  9. title: 'Ticket Priority Icons',
  10. name: 'ui_ticket_priority_icons',
  11. area: 'UI::Ticket::Priority',
  12. description: 'Enables display of ticket priority icons in UI.',
  13. options: {
  14. form: [
  15. {
  16. display: '',
  17. null: true,
  18. name: 'ui_ticket_priority_icons',
  19. tag: 'boolean',
  20. translate: true,
  21. options: {
  22. true => 'yes',
  23. false => 'no',
  24. },
  25. },
  26. ],
  27. },
  28. )
  29. rescue => e
  30. Rails.logger.error e
  31. end
  32. end