profile.rb 577 B

12345678910111213141516171819202122232425
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. FactoryBot.define do
  3. factory :'report/profile', aliases: %i[report_profile] do
  4. sequence(:name) { |n| "Report #{n}" }
  5. active { true }
  6. created_by_id { 1 }
  7. updated_by_id { 1 }
  8. trait :condition_created_at do
  9. transient do
  10. ticket_created_at { nil }
  11. end
  12. condition do
  13. {
  14. 'ticket.created_at' => {
  15. operator: 'before (absolute)',
  16. value: ticket_created_at.iso8601
  17. }
  18. }
  19. end
  20. end
  21. end
  22. end