overview.rb 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. FactoryBot.define do
  3. factory :overview do
  4. sequence(:name) { |n| "Test Overview #{n}" }
  5. prio { 1 }
  6. role_ids { Role.where(name: %w[Customer Agent Admin]).pluck(:id) }
  7. out_of_office { false }
  8. updated_by_id { 1 }
  9. created_by_id { 1 }
  10. condition do
  11. {
  12. 'ticket.state_id' => {
  13. operator: 'is',
  14. value: Ticket::State.where(name: %w[new open]).pluck(:id),
  15. },
  16. }
  17. end
  18. order do
  19. {
  20. by: 'created_at',
  21. direction: 'DESC',
  22. }
  23. end
  24. view do
  25. {
  26. d: %w[title customer state created_at],
  27. s: %w[number title state created_at],
  28. m: %w[number title state created_at],
  29. view_mode_default: 's',
  30. }
  31. end
  32. end
  33. end