Fixed check if init owner selection of new ticket screen is empty.
This commit is contained in:
parent
afc241e72a
commit
c873789385
1 changed files with 17 additions and 17 deletions
|
@ -32,12 +32,12 @@ list attributes
|
||||||
returns
|
returns
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
:type_id => type_ids,
|
:type_id => type_ids,
|
||||||
:state_id => state_ids,
|
:state_id => state_ids,
|
||||||
:priority_id => priority_ids,
|
:priority_id => priority_ids,
|
||||||
:owner_id => owner_ids,
|
:owner_id => owner_ids,
|
||||||
:group_id => group_ids,
|
:group_id => group_ids,
|
||||||
:group_id__owner_id => groups_users,
|
:group_id__owner_id => groups_users,
|
||||||
}
|
}
|
||||||
|
|
||||||
=end
|
=end
|
||||||
|
@ -103,7 +103,7 @@ returns
|
||||||
agents[ user.id ] = 1
|
agents[ user.id ] = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies = { :group_id => { '' => [] } }
|
dependencies = { :group_id => { '' => { :owner_id => [] } } }
|
||||||
Group.where( :active => true ).each { |group|
|
Group.where( :active => true ).each { |group|
|
||||||
assets = group.assets(assets)
|
assets = group.assets(assets)
|
||||||
dependencies[:group_id][group.id] = { :owner_id => [] }
|
dependencies[:group_id][group.id] = { :owner_id => [] }
|
||||||
|
@ -115,9 +115,9 @@ returns
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
:assets => assets,
|
:assets => assets,
|
||||||
:filter => filter,
|
:filter => filter,
|
||||||
:dependencies => dependencies,
|
:dependencies => dependencies,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -126,8 +126,8 @@ returns
|
||||||
list tickets by customer groupd in state categroie open and closed
|
list tickets by customer groupd in state categroie open and closed
|
||||||
|
|
||||||
result = Ticket::ScreenOptions.list_by_customer(
|
result = Ticket::ScreenOptions.list_by_customer(
|
||||||
:customer_id => 123,
|
:customer_id => 123,
|
||||||
:limit => 15, # optional, default 15
|
:limit => 15, # optional, default 15
|
||||||
)
|
)
|
||||||
|
|
||||||
returns
|
returns
|
||||||
|
@ -147,13 +147,13 @@ returns
|
||||||
|
|
||||||
# get tickets
|
# get tickets
|
||||||
tickets_open = Ticket.where(
|
tickets_open = Ticket.where(
|
||||||
:customer_id => data[:customer_id],
|
:customer_id => data[:customer_id],
|
||||||
:state_id => state_list_open
|
:state_id => state_list_open
|
||||||
).limit( data[:limit] || 15 ).order('created_at DESC')
|
).limit( data[:limit] || 15 ).order('created_at DESC')
|
||||||
|
|
||||||
tickets_closed = Ticket.where(
|
tickets_closed = Ticket.where(
|
||||||
:customer_id => data[:customer_id],
|
:customer_id => data[:customer_id],
|
||||||
:state_id => state_list_closed
|
:state_id => state_list_closed
|
||||||
).limit( data[:limit] || 15 ).order('created_at DESC')
|
).limit( data[:limit] || 15 ).order('created_at DESC')
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -162,4 +162,4 @@ returns
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
Loading…
Reference in a new issue