2018-05-30 08:49:54 +00:00
class TicketLastContactBehavior < ActiveRecord :: Migration [ 5 . 1 ]
def up
# return if it's a new setup
return if ! Setting . find_by ( name : 'system_init_done' )
Setting . create_if_not_exists (
2018-12-19 17:31:51 +00:00
title : 'Ticket Last Contact Behaviour' ,
name : 'ticket_last_contact_behaviour' ,
area : 'Ticket::Base' ,
2018-05-30 08:49:54 +00:00
description : 'Sets the last customer contact based on the last contact of a customer or on the last contact of a customer to whom an agent has not yet responded.' ,
2018-12-19 17:31:51 +00:00
options : {
2018-05-30 08:49:54 +00:00
form : [
{
2018-12-19 17:31:51 +00:00
display : '' ,
null : true ,
name : 'ticket_last_contact_behaviour' ,
tag : 'select' ,
2018-05-30 08:49:54 +00:00
translate : true ,
2018-12-19 17:31:51 +00:00
options : {
'based_on_customer_reaction' = > 'Last customer contact (without consideration an agent has replied to it)' ,
2018-05-30 08:49:54 +00:00
'check_if_agent_already_replied' = > 'Last customer contact (with consideration an agent has replied to it)' ,
} ,
} ,
] ,
} ,
2018-12-19 17:31:51 +00:00
state : 'check_if_agent_already_replied' ,
2018-05-30 08:49:54 +00:00
preferences : {
permission : [ 'admin.ticket' ] ,
} ,
2018-12-19 17:31:51 +00:00
frontend : false
2018-05-30 08:49:54 +00:00
)
end
end