Fixed issue #633 - Unable to activate time accounting in admin interface.
This commit is contained in:
parent
e0a71e6e93
commit
d0b26eb55a
1 changed files with 52 additions and 0 deletions
|
@ -0,0 +1,52 @@
|
||||||
|
class UnableToEnableTimeAccounting633 < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
|
||||||
|
# return if it's a new setup
|
||||||
|
return if !Setting.find_by(name: 'system_init_done')
|
||||||
|
|
||||||
|
Setting.create_if_not_exists(
|
||||||
|
title: 'Time Accounting',
|
||||||
|
name: 'time_accounting',
|
||||||
|
area: 'Web::Base',
|
||||||
|
description: 'Enable time accounting.',
|
||||||
|
options: {
|
||||||
|
form: [
|
||||||
|
{
|
||||||
|
display: '',
|
||||||
|
null: true,
|
||||||
|
name: 'time_accounting',
|
||||||
|
tag: 'boolean',
|
||||||
|
options: {
|
||||||
|
true => 'yes',
|
||||||
|
false => 'no',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
preferences: {
|
||||||
|
authentication: true,
|
||||||
|
permission: ['admin.time_accounting'],
|
||||||
|
},
|
||||||
|
state: false,
|
||||||
|
frontend: true
|
||||||
|
)
|
||||||
|
|
||||||
|
Setting.create_if_not_exists(
|
||||||
|
title: 'Time Accounting Selector',
|
||||||
|
name: 'time_accounting_selector',
|
||||||
|
area: 'Web::Base',
|
||||||
|
description: 'Enable time accounting for this tickets.',
|
||||||
|
options: {
|
||||||
|
form: [
|
||||||
|
{},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
preferences: {
|
||||||
|
authentication: true,
|
||||||
|
permission: ['admin.time_accounting'],
|
||||||
|
},
|
||||||
|
state: {},
|
||||||
|
frontend: true
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue