Improved sla/escalation calculation.
This commit is contained in:
parent
024720e515
commit
1f266e3110
2 changed files with 37 additions and 18 deletions
15
db/migrate/20130219061532_change_ticket_escalation.rb
Normal file
15
db/migrate/20130219061532_change_ticket_escalation.rb
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
class ChangeTicketEscalation < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
add_column :tickets, :first_response_in_min, :integer, :null => true
|
||||||
|
add_column :tickets, :first_response_diff_in_min, :integer, :null => true
|
||||||
|
add_index :tickets, [:first_response_in_min]
|
||||||
|
add_index :tickets, [:first_response_diff_in_min]
|
||||||
|
|
||||||
|
add_column :tickets, :close_time_in_min, :integer, :null => true
|
||||||
|
add_column :tickets, :close_time_diff_in_min, :integer, :null => true
|
||||||
|
add_index :tickets, [:close_time_in_min]
|
||||||
|
add_index :tickets, [:close_time_diff_in_min]
|
||||||
|
end
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
|
@ -186,11 +186,13 @@ module Import::OTRS
|
||||||
:Title => :title,
|
:Title => :title,
|
||||||
:TicketID => :id,
|
:TicketID => :id,
|
||||||
:FirstResponse => :first_response,
|
:FirstResponse => :first_response,
|
||||||
# :FirstResponseInMin => ?,
|
:FirstResponseTimeDestinationDate => :first_response_escal_date,
|
||||||
# :FirstResponseDiffInMin => ?,
|
:FirstResponseInMin => :first_response_in_min,
|
||||||
|
:FirstResponseDiffInMin => :first_response_diff_in_min,
|
||||||
:Closed => :close_time,
|
:Closed => :close_time,
|
||||||
# :CloseTimeInMin => ?,
|
:SoltutionTimeDestinationDate => :close_time_escal_date,
|
||||||
# :CloseTimeDiffInMin => ?,
|
:CloseTimeInMin => :close_time_in_min,
|
||||||
|
:CloseTimeDiffInMin => :close_time_diff_in_min,
|
||||||
},
|
},
|
||||||
:Article => {
|
:Article => {
|
||||||
:SenderType => :ticket_article_sender,
|
:SenderType => :ticket_article_sender,
|
||||||
|
@ -224,8 +226,10 @@ module Import::OTRS
|
||||||
:updated_by_id => 1,
|
:updated_by_id => 1,
|
||||||
}
|
}
|
||||||
map[:Ticket].each { |key,value|
|
map[:Ticket].each { |key,value|
|
||||||
if record['Ticket'][key.to_s]
|
if record['Ticket'][key.to_s] && record['Ticket'][key.to_s].class == String
|
||||||
ticket_new[value] = Encode.conv( 'utf8', record['Ticket'][key.to_s] )
|
ticket_new[value] = Encode.conv( 'utf8', record['Ticket'][key.to_s] )
|
||||||
|
else
|
||||||
|
ticket_new[value] = record['Ticket'][key.to_s]
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
# puts key.to_s
|
# puts key.to_s
|
||||||
|
|
Loading…
Reference in a new issue