If ticket is escalated, overwrite task state.
This commit is contained in:
parent
63c187dd41
commit
713ebaa680
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,10 @@ class App.Ticket extends App.Model
|
||||||
state = 'closed'
|
state = 'closed'
|
||||||
if stateType.name is 'new' || stateType.name is 'open'
|
if stateType.name is 'new' || stateType.name is 'open'
|
||||||
state = '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'
|
else if stateType.name is 'pending reminder' || stateType.name is 'pending action'
|
||||||
state = 'pending'
|
state = 'pending'
|
||||||
state
|
state
|
||||||
|
|
Loading…
Reference in a new issue