Added new category.

This commit is contained in:
Martin Edenhofer 2015-09-08 09:49:15 +02:00
parent 27472e3877
commit 625b7961ab

View file

@ -9,7 +9,7 @@ class Ticket::State < ApplicationModel
list tickets by customer list tickets by customer
states = Ticket::State.by_category('open') # open|closed|work_on|work_on_all|pending_reminder states = Ticket::State.by_category('open') # open|closed|work_on|work_on_all|pending_reminder|pending_action
returns: returns:
@ -26,6 +26,10 @@ returns:
return Ticket::State.where( return Ticket::State.where(
state_type_id: Ticket::StateType.where( name: ['pending reminder'] ) state_type_id: Ticket::StateType.where( name: ['pending reminder'] )
) )
elsif category == 'pending_action'
return Ticket::State.where(
state_type_id: Ticket::StateType.where( name: ['pending action'] )
)
elsif category == 'work_on' elsif category == 'work_on'
return Ticket::State.where( return Ticket::State.where(
state_type_id: Ticket::StateType.where( name: ['new', 'open'] ) state_type_id: Ticket::StateType.where( name: ['new', 'open'] )