Fixed ticket list order.
This commit is contained in:
parent
5fe9e03348
commit
9c396593bf
1 changed files with 4 additions and 1 deletions
|
@ -193,7 +193,10 @@ class TicketsController < ApplicationController
|
||||||
:ticket_state_type_id => Ticket::StateType.where( :name => ['new','open', 'pending reminder', 'pending action', 'closed'] )
|
:ticket_state_type_id => Ticket::StateType.where( :name => ['new','open', 'pending reminder', 'pending action', 'closed'] )
|
||||||
)
|
)
|
||||||
ticket = Ticket.find( params[:ticket_id] )
|
ticket = Ticket.find( params[:ticket_id] )
|
||||||
ticket_list = Ticket.where( :customer_id => ticket.customer_id, :ticket_state_id => ticket_states ).where( 'id != ?', [ ticket.id ] ) .limit(6)
|
ticket_list = Ticket.where( :customer_id => ticket.customer_id, :ticket_state_id => ticket_states )
|
||||||
|
.where( 'id != ?', [ ticket.id ] )
|
||||||
|
.order('created_at DESC')
|
||||||
|
.limit(6)
|
||||||
|
|
||||||
# get related users
|
# get related users
|
||||||
users = {}
|
users = {}
|
||||||
|
|
Loading…
Reference in a new issue