ticket_states.rb 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. Ticket::State.create_if_not_exists(
  3. id: 1,
  4. name: __('new'),
  5. state_type_id: Ticket::StateType.find_by(name: 'new').id,
  6. default_create: true,
  7. )
  8. Ticket::State.create_if_not_exists(
  9. id: 2,
  10. name: __('open'),
  11. state_type_id: Ticket::StateType.find_by(name: 'open').id,
  12. default_follow_up: true,
  13. )
  14. Ticket::State.create_if_not_exists(
  15. id: 3,
  16. name: __('pending reminder'),
  17. state_type_id: Ticket::StateType.find_by(name: 'pending reminder').id,
  18. ignore_escalation: true,
  19. )
  20. Ticket::State.create_if_not_exists(
  21. id: 4,
  22. name: __('closed'),
  23. state_type_id: Ticket::StateType.find_by(name: 'closed').id,
  24. ignore_escalation: true,
  25. )
  26. Ticket::State.create_if_not_exists(
  27. id: 5,
  28. name: __('merged'),
  29. state_type_id: Ticket::StateType.find_by(name: 'merged').id,
  30. ignore_escalation: true,
  31. )
  32. Ticket::State.create_if_not_exists(
  33. id: 6,
  34. name: __('removed'),
  35. state_type_id: Ticket::StateType.find_by(name: 'removed').id,
  36. active: false,
  37. ignore_escalation: true,
  38. )
  39. Ticket::State.create_if_not_exists(
  40. id: 7,
  41. name: __('pending close'),
  42. state_type_id: Ticket::StateType.find_by(name: 'pending action').id,
  43. next_state_id: Ticket::State.by_category(:closed).first.id,
  44. ignore_escalation: true,
  45. )