Fixed from global start time to local start time.
This commit is contained in:
parent
d313170d87
commit
710773255e
1 changed files with 3 additions and 3 deletions
|
@ -750,7 +750,7 @@ class Ticket < ApplicationModel
|
||||||
# get initial state and time
|
# get initial state and time
|
||||||
if !last_state
|
if !last_state
|
||||||
last_state = history_item['value_from']
|
last_state = history_item['value_from']
|
||||||
last_state_change = self.created_at
|
last_state_change = start_time
|
||||||
end
|
end
|
||||||
|
|
||||||
# use time if ticket got from e. g. open to pending
|
# use time if ticket got from e. g. open to pending
|
||||||
|
@ -811,9 +811,9 @@ class Ticket < ApplicationModel
|
||||||
# if we have not had any state change
|
# if we have not had any state change
|
||||||
if !last_state_change
|
if !last_state_change
|
||||||
if sla_selected
|
if sla_selected
|
||||||
diff = TimeCalculation.business_time_diff( self.created_at, end_time, sla_selected.data, sla_selected.timezone)
|
diff = TimeCalculation.business_time_diff( start_time, end_time, sla_selected.data, sla_selected.timezone)
|
||||||
else
|
else
|
||||||
diff = TimeCalculation.business_time_diff( self.created_at, end_time )
|
diff = TimeCalculation.business_time_diff( start_time, end_time )
|
||||||
end
|
end
|
||||||
puts 'Diff state has not changed ' + diff.to_s
|
puts 'Diff state has not changed ' + diff.to_s
|
||||||
total_time_without_pending = total_time_without_pending + diff
|
total_time_without_pending = total_time_without_pending + diff
|
||||||
|
|
Loading…
Reference in a new issue