2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2018-06-22 12:57:25 +00:00
|
|
|
FactoryBot.define do
|
2018-02-09 15:46:55 +00:00
|
|
|
factory :overview do
|
2019-02-26 11:00:46 +00:00
|
|
|
sequence(:name) { |n| "Test Overview #{n}" }
|
|
|
|
prio { 1 }
|
|
|
|
role_ids { Role.where(name: %w[Customer Agent Admin]).pluck(:id) }
|
2020-08-20 07:10:08 +00:00
|
|
|
out_of_office { false }
|
2019-02-26 11:00:46 +00:00
|
|
|
updated_by_id { 1 }
|
|
|
|
created_by_id { 1 }
|
|
|
|
|
2018-02-09 15:46:55 +00:00
|
|
|
condition do
|
|
|
|
{
|
|
|
|
'ticket.state_id' => {
|
|
|
|
operator: 'is',
|
2019-02-26 11:00:46 +00:00
|
|
|
value: Ticket::State.where(name: %w[new open]).pluck(:id),
|
2018-02-09 15:46:55 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
end
|
2019-02-26 11:00:46 +00:00
|
|
|
|
2018-02-09 15:46:55 +00:00
|
|
|
order do
|
|
|
|
{
|
2018-12-19 17:31:51 +00:00
|
|
|
by: 'created_at',
|
2018-02-09 15:46:55 +00:00
|
|
|
direction: 'DESC',
|
|
|
|
}
|
|
|
|
end
|
2019-02-26 11:00:46 +00:00
|
|
|
|
2018-02-09 15:46:55 +00:00
|
|
|
view do
|
|
|
|
{
|
2018-12-19 17:31:51 +00:00
|
|
|
d: %w[title customer state created_at],
|
|
|
|
s: %w[number title state created_at],
|
|
|
|
m: %w[number title state created_at],
|
2018-02-09 15:46:55 +00:00
|
|
|
view_mode_default: 's',
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|