20230620090110_ticket_organization_reassignment.rb 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TicketOrganizationReassignment < ActiveRecord::Migration[6.1]
  3. def change
  4. # return if it's a new setup
  5. return if !Setting.exists?(name: 'system_init_done')
  6. Setting.create_if_not_exists(
  7. title: 'Ticket Organization Reassignment',
  8. name: 'ticket_organization_reassignment',
  9. area: 'Ticket::Base',
  10. description: 'Defines if the change of the primary organization of a user will update the 100 most recent tickets for this user as well.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: false,
  16. name: 'ticket_organization_reassignment',
  17. tag: 'boolean',
  18. options: {
  19. true => 'Update the most recent tickets.',
  20. false => 'Do not update any tickets.',
  21. },
  22. translate: true,
  23. },
  24. ],
  25. },
  26. state: true,
  27. preferences: {
  28. prio: 4000,
  29. permission: ['admin.ticket'],
  30. },
  31. frontend: true
  32. )
  33. end
  34. end