Added table names to ticket conditions.

This commit is contained in:
Martin Edenhofer 2013-02-01 11:44:30 +01:00
parent 8436f292c7
commit 8e8917c314
2 changed files with 49 additions and 49 deletions

View file

@ -434,9 +434,9 @@ class App.ControllerForm extends App.Controller
addShownAttribute = ( key, value ) => addShownAttribute = ( key, value ) =>
console.log( 'addShownAttribute', key, value ) console.log( 'addShownAttribute', key, value )
if key is 'number' if key is 'tickets.number'
attribute_config = { attribute_config = {
name: attribute.name + '::number' name: attribute.name + '::tickets.number'
display: 'Number' display: 'Number'
tag: 'input' tag: 'input'
type: 'text' type: 'text'
@ -445,9 +445,9 @@ class App.ControllerForm extends App.Controller
class: 'medium' class: 'medium'
remove: true remove: true
} }
else if key is 'title' else if key is 'tickets.title'
attribute_config = { attribute_config = {
name: attribute.name + '::title' name: attribute.name + '::tickets.title'
display: 'Title' display: 'Title'
tag: 'input' tag: 'input'
type: 'text' type: 'text'
@ -456,9 +456,9 @@ class App.ControllerForm extends App.Controller
class: 'medium' class: 'medium'
remove: true remove: true
} }
else if key is 'group_id' else if key is 'tickets.group_id'
attribute_config = { attribute_config = {
name: attribute.name + '::group_id' name: attribute.name + '::tickets.group_id'
display: 'Group' display: 'Group'
tag: 'select' tag: 'select'
multiple: true multiple: true
@ -469,14 +469,14 @@ class App.ControllerForm extends App.Controller
class: 'medium' class: 'medium'
remove: true remove: true
} }
else if key is 'owner_id' || key is 'customer_id' else if key is 'tickets.owner_id' || key is 'tickets.customer_id'
display = 'Owner' display = 'Owner'
name = 'owner_id' name = 'owner_id'
if key is 'customer_id' if key is 'customer_id'
display = 'Customer' display = 'Customer'
name = 'customer_id' name = 'customer_id'
attribute_config = { attribute_config = {
name: attribute.name + '::' + name name: attribute.name + '::tickets.' + name
display: display display: display
tag: 'select' tag: 'select'
multiple: true multiple: true
@ -506,9 +506,9 @@ class App.ControllerForm extends App.Controller
} ) } )
all all
} }
else if key is 'organization_id' else if key is 'tickets.organization_id'
attribute_config = { attribute_config = {
name: attribute.name + '::organization_id' name: attribute.name + '::tickets.organization_id'
display: 'Organization' display: 'Organization'
tag: 'select' tag: 'select'
multiple: true multiple: true
@ -530,9 +530,9 @@ class App.ControllerForm extends App.Controller
} ) } )
all all
} }
else if key is 'ticket_state_id' else if key is 'tickets.ticket_state_id'
attribute_config = { attribute_config = {
name: attribute.name + '::ticket_state_id' name: attribute.name + '::tickets.ticket_state_id'
display: 'State' display: 'State'
tag: 'select' tag: 'select'
multiple: true multiple: true
@ -544,9 +544,9 @@ class App.ControllerForm extends App.Controller
class: 'medium' class: 'medium'
remove: true remove: true
} }
else if key is 'ticket_priority_id' else if key is 'tickets.ticket_priority_id'
attribute_config = { attribute_config = {
name: attribute.name + '::ticket_priority_id' name: attribute.name + '::tickets.ticket_priority_id'
display: 'Priority' display: 'Priority'
tag: 'select' tag: 'select'
multiple: true multiple: true
@ -599,49 +599,49 @@ class App.ControllerForm extends App.Controller
disable: true disable: true
}, },
# { # {
# value: 'number' # value: 'tickets.number'
# name: 'Number' # name: 'Number'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'title' # value: 'tickets.title'
# name: 'Title' # name: 'Title'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
{ {
value: 'group_id' value: 'tickets.group_id'
name: 'Group' name: 'Group'
selected: false selected: false
disable: false disable: false
}, },
{ {
value: 'ticket_state_id' value: 'tickets.ticket_state_id'
name: 'State' name: 'State'
selected: false selected: false
disable: false disable: false
}, },
{ {
value: 'ticket_priority_id' value: 'tickets.ticket_priority_id'
name: 'Priority' name: 'Priority'
selected: true selected: true
disable: false disable: false
}, },
{ {
value: 'owner_id' value: 'tickets.owner_id'
name: 'Owner' name: 'Owner'
selected: true selected: true
disable: false disable: false
}, },
{ {
value: 'customer_id' value: 'tickets.customer_id'
name: 'Customer' name: 'Customer'
selected: true selected: true
disable: false disable: false
}, },
{ {
value: 'organization_id' value: 'tickets.organization_id'
name: 'Organization' name: 'Organization'
selected: true selected: true
disable: false disable: false
@ -654,37 +654,37 @@ class App.ControllerForm extends App.Controller
# disable: false # disable: false
# }, # },
# { # {
# value: 'created_before' # value: 'tickets.created_before'
# name: 'Erstell vor' # name: 'Erstell vor'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'created_after' # value: 'tickets.created_after'
# name: 'Erstell nach' # name: 'Erstell nach'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'created_between' # value: 'tickets.created_between'
# name: 'Erstell zwischen' # name: 'Erstell zwischen'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'closed_before' # value: 'tickets.closed_before'
# name: 'Geschlossen vor' # name: 'Geschlossen vor'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'closed_after' # value: 'tickets.closed_after'
# name: 'Geschlossen nach' # name: 'Geschlossen nach'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'closed_between' # value: 'tickets.closed_between'
# name: 'Geschlossen zwischen' # name: 'Geschlossen zwischen'
# selected: true # selected: true
# disable: false # disable: false
@ -696,31 +696,31 @@ class App.ControllerForm extends App.Controller
# disable: true # disable: true
# }, # },
# { # {
# value: 'from' # value: 'ticket_articles.from'
# name: 'From' # name: 'From'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'to' # value: 'ticket_articles.to'
# name: 'To' # name: 'To'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'cc' # value: 'ticket_articles.cc'
# name: 'Cc' # name: 'Cc'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'subject' # value: 'ticket_articles.subject'
# name: 'Subject' # name: 'Subject'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'body' # value: 'ticket_articles.body'
# name: 'Text' # name: 'Text'
# selected: true # selected: true
# disable: false # disable: false
@ -732,13 +732,13 @@ class App.ControllerForm extends App.Controller
# disable: true # disable: true
# }, # },
# { # {
# value: 'customer_user' # value: 'customers.id'
# name: 'Kunde' # name: 'Kunde'
# selected: true # selected: true
# disable: false # disable: false
# }, # },
# { # {
# value: 'organization' # value: 'organization.id'
# name: 'Organization' # name: 'Organization'
# selected: true # selected: true
# disable: false # disable: false

View file

@ -1172,8 +1172,8 @@ Overview.create_if_not_exists(
:prio => 1000, :prio => 1000,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [ 1,2,3 ], 'tickets.ticket_state_id' => [ 1,2,3 ],
:owner_id => 'current_user.id', 'tickets.owner_id' => 'current_user.id',
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1195,8 +1195,8 @@ Overview.create_if_not_exists(
:prio => 1001, :prio => 1001,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [1,2,3], 'tickets.ticket_state_id' => [1,2,3],
:owner_id => 1, 'tickets.owner_id' => 1,
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1218,7 +1218,7 @@ Overview.create_if_not_exists(
:prio => 1002, :prio => 1002,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [1,2,3], 'tickets.ticket_state_id' => [1,2,3],
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1240,7 +1240,7 @@ Overview.create_if_not_exists(
:prio => 1010, :prio => 1010,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [1,2,3], 'tickets.ticket_state_id' => [1,2,3],
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1262,8 +1262,8 @@ Overview.create_if_not_exists(
:prio => 1020, :prio => 1020,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [3], 'tickets.ticket_state_id' => [3],
:owner_id => 'current_user.id', 'tickets.owner_id' => 'current_user.id',
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1285,8 +1285,8 @@ Overview.create_if_not_exists(
:prio => 9003, :prio => 9003,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
# :ticket_state_id => [3], # 'tickets.ticket_state_id' => [3],
# :owner_id => current_user.id, # 'tickets.owner_id' => current_user.id,
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1309,8 +1309,8 @@ Overview.create_if_not_exists(
:prio => 1000, :prio => 1000,
:role_id => overview_role.id, :role_id => overview_role.id,
:condition => { :condition => {
:ticket_state_id => [ 1,2,3,4,6 ], 'tickets.ticket_state_id' => [ 1,2,3,4,6 ],
:customer_id => 'current_user.id', 'tickets.customer_id' => 'current_user.id',
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',
@ -1332,8 +1332,8 @@ Overview.create_if_not_exists(
:role_id => overview_role.id, :role_id => overview_role.id,
:organization_shared => true, :organization_shared => true,
:condition => { :condition => {
:ticket_state_id => [ 1,2,3,4,6 ], 'tickets.ticket_state_id' => [ 1,2,3,4,6 ],
:organization_id => 'current_user.organization_id', 'tickets.organization_id' => 'current_user.organization_id',
}, },
:order => { :order => {
:by => 'created_at', :by => 'created_at',