sla.rb 328 B

1234567891011121314151617
  1. FactoryBot.define do
  2. factory :sla do
  3. calendar
  4. sequence(:name) { |n| "SLA #{n}" }
  5. created_by_id { 1 }
  6. updated_by_id { 1 }
  7. condition do
  8. {
  9. 'ticket.state_id' => {
  10. operator: 'is',
  11. value: Ticket::State.by_category(:open).pluck(:id),
  12. },
  13. }
  14. end
  15. end
  16. end