diff --git a/app/models/ticket/escalation.rb b/app/models/ticket/escalation.rb index 0baa27a2b..89d8a2371 100644 --- a/app/models/ticket/escalation.rb +++ b/app/models/ticket/escalation.rb @@ -253,7 +253,7 @@ returns # check if time need to be counted counted = true - if history_item['value_from'] == 'pending' + if history_item['value_from'] == 'pending reminder' counted = false elsif history_item['value_from'] == 'close' counted = false @@ -268,7 +268,7 @@ returns end total_time = total_time + diff - if history_item['value_to'] == 'pending' + if history_item['value_to'] == 'pending reminder' last_state_is_pending = true else last_state_is_pending = false diff --git a/test/unit/ticket_sla_test.rb b/test/unit/ticket_sla_test.rb index f044f2861..3bc302787 100644 --- a/test/unit/ticket_sla_test.rb +++ b/test/unit/ticket_sla_test.rb @@ -495,7 +495,7 @@ class TicketSlaTest < ActiveSupport::TestCase :id_to => 3, :id_from => 2, :value_from => 'open', - :value_to => 'pending', + :value_to => 'pending reminder', :created_by_id => 1, :created_at => '2013-06-04 10:00:00 UTC', :updated_at => '2013-06-04 10:00:00 UTC', @@ -509,7 +509,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 2, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'open', :created_by_id => 1, :created_at => '2013-06-04 10:30:00 UTC', @@ -582,7 +582,7 @@ class TicketSlaTest < ActiveSupport::TestCase :title => 'some title äöüß3', :group => Group.lookup( :name => 'Users'), :customer_id => 2, - :state => Ticket::State.lookup( :name => 'pending' ), + :state => Ticket::State.lookup( :name => 'pending reminder' ), :priority => Ticket::Priority.lookup( :name => '2 normal' ), :created_at => '2013-06-04 09:00:00 UTC', :updated_at => '2013-06-04 09:00:00 UTC', @@ -600,7 +600,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 4, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'closed', :created_by_id => 1, :created_at => '2013-06-04 12:00:00 UTC', @@ -648,7 +648,7 @@ class TicketSlaTest < ActiveSupport::TestCase :title => 'some title äöüß3', :group => Group.lookup( :name => 'Users'), :customer_id => 2, - :state => Ticket::State.lookup( :name => 'pending' ), + :state => Ticket::State.lookup( :name => 'pending reminder' ), :priority => Ticket::Priority.lookup( :name => '2 normal' ), :created_at => '2013-06-04 09:00:00 UTC', :updated_at => '2013-06-04 09:00:00 UTC', @@ -665,7 +665,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 2, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'open', :created_by_id => 1, :created_at => '2013-06-04 10:30:00 UTC', @@ -681,7 +681,7 @@ class TicketSlaTest < ActiveSupport::TestCase :id_to => 3, :id_from => 2, :value_from => 'open', - :value_to => 'pending', + :value_to => 'pending reminder', :created_by_id => 1, :created_at => '2013-06-04 11:00:00 UTC', :updated_at => '2013-06-04 11:00:00 UTC', @@ -695,7 +695,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 4, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'closed', :created_by_id => 1, :created_at => '2013-06-04 12:00:00 UTC', @@ -743,7 +743,7 @@ class TicketSlaTest < ActiveSupport::TestCase :title => 'some title äöüß3', :group => Group.lookup( :name => 'Users'), :customer_id => 2, - :state => Ticket::State.lookup( :name => 'pending' ), + :state => Ticket::State.lookup( :name => 'pending reminder' ), :priority => Ticket::Priority.lookup( :name => '2 normal' ), :created_at => '2013-06-04 09:00:00 UTC', :updated_at => '2013-06-04 09:00:00 UTC', @@ -760,7 +760,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 2, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'open', :created_by_id => 1, :created_at => '2013-06-04 10:30:00 UTC', @@ -776,7 +776,7 @@ class TicketSlaTest < ActiveSupport::TestCase :id_to => 3, :id_from => 2, :value_from => 'open', - :value_to => 'pending', + :value_to => 'pending reminder', :created_by_id => 1, :created_at => '2013-06-04 11:00:00 UTC', :updated_at => '2013-06-04 11:00:00 UTC', @@ -790,7 +790,7 @@ class TicketSlaTest < ActiveSupport::TestCase :o_id => ticket.id, :id_to => 2, :id_from => 3, - :value_from => 'pending', + :value_from => 'pending reminder', :value_to => 'open', :created_by_id => 1, :created_at => '2013-06-04 11:30:00 UTC',