2017-09-08 08:28:34 +00:00
|
|
|
class FollowUpPossibleCheck643 < ActiveRecord::Migration[4.2]
|
2017-01-31 08:56:59 +00:00
|
|
|
def up
|
|
|
|
|
|
|
|
# return if it's a new setup
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2017-01-31 08:56:59 +00:00
|
|
|
|
|
|
|
Setting.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
title: 'Define postmaster filter.',
|
|
|
|
name: '0200_postmaster_filter_follow_up_possible_check',
|
|
|
|
area: 'Postmaster::PreFilter',
|
2019-08-16 15:39:31 +00:00
|
|
|
description: 'Define postmaster filter to check if follow-ups get created (based on admin settings).',
|
2018-12-19 17:31:51 +00:00
|
|
|
options: {},
|
|
|
|
state: 'Channel::Filter::FollowUpPossibleCheck',
|
|
|
|
frontend: false
|
2017-01-31 08:56:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'Group',
|
|
|
|
name: 'follow_up_possible',
|
2019-08-16 15:39:31 +00:00
|
|
|
display: 'Follow-up possible',
|
2018-12-19 17:31:51 +00:00
|
|
|
data_type: 'select',
|
2017-01-31 08:56:59 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
default: 'yes',
|
|
|
|
options: {
|
|
|
|
yes: 'yes',
|
2017-01-31 08:56:59 +00:00
|
|
|
new_ticket: 'do not reopen Ticket but create new Ticket'
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
null: false,
|
2019-08-16 15:39:31 +00:00
|
|
|
note: 'Follow-up for closed ticket possible or not.',
|
2017-01-31 08:56:59 +00:00
|
|
|
translate: true
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
2017-01-31 08:56:59 +00:00
|
|
|
create: {
|
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2017-01-31 08:56:59 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 400,
|
2017-01-31 08:56:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|