ticket_states.rb 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Copyright (C) 2012-2024 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: __('pending close'),
  35. state_type_id: Ticket::StateType.find_by(name: 'pending action').id,
  36. next_state_id: Ticket::State.by_category(:closed).first.id,
  37. ignore_escalation: true,
  38. )