20180521141004_ticket_last_contact_behavior.rb 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TicketLastContactBehavior < 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.create_if_not_exists(
  7. title: 'Ticket Last Contact Behaviour',
  8. name: 'ticket_last_contact_behaviour',
  9. area: 'Ticket::Base',
  10. description: 'Sets the last customer contact based on the last contact of a customer or on the last contact of a customer to whom an agent has not yet responded.',
  11. options: {
  12. form: [
  13. {
  14. display: '',
  15. null: true,
  16. name: 'ticket_last_contact_behaviour',
  17. tag: 'select',
  18. translate: true,
  19. options: {
  20. 'based_on_customer_reaction' => 'Last customer contact (without consideration an agent has replied to it)',
  21. 'check_if_agent_already_replied' => 'Last customer contact (with consideration an agent has replied to it)',
  22. },
  23. },
  24. ],
  25. },
  26. state: 'check_if_agent_already_replied',
  27. preferences: {
  28. permission: ['admin.ticket'],
  29. },
  30. frontend: false
  31. )
  32. end
  33. end