diff --git a/app/assets/javascripts/app/models/ticket.coffee b/app/assets/javascripts/app/models/ticket.coffee index c6765c26f..6255534f3 100644 --- a/app/assets/javascripts/app/models/ticket.coffee +++ b/app/assets/javascripts/app/models/ticket.coffee @@ -34,6 +34,10 @@ class App.Ticket extends App.Model state = 'closed' if stateType.name is 'new' || stateType.name is 'open' state = 'open' + + # if ticket is escalated, overwrite state + if @escalation_time && new Date( Date.parse( @escalation_time ) ) < new Date + state = 'escalating' else if stateType.name is 'pending reminder' || stateType.name is 'pending action' state = 'pending' state