Fixed issue #2981 - OTRS migration priority color wrong for 3 normal.
This commit is contained in:
parent
1ab179f22f
commit
13ddd3af38
2 changed files with 16 additions and 0 deletions
|
@ -47,10 +47,24 @@ module Import
|
|||
reset_primary_key_sequence('ticket_priorities')
|
||||
end
|
||||
|
||||
def ui_color(priority)
|
||||
return 'high-priority' if ['4 high', '5 very high'].include?(priority['Name'])
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
def ui_icon(priority)
|
||||
return 'important' if ['4 high', '5 very high'].include?(priority['Name'])
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
def map(priority)
|
||||
{
|
||||
created_by_id: 1,
|
||||
updated_by_id: 1,
|
||||
ui_color: ui_color(priority),
|
||||
ui_icon: ui_icon(priority),
|
||||
active: active?(priority),
|
||||
}
|
||||
.merge(from_mapping(priority))
|
||||
|
|
|
@ -34,6 +34,8 @@ RSpec.describe Import::OTRS::Priority do
|
|||
active: true,
|
||||
updated_at: '2014-04-28 10:53:18',
|
||||
created_at: '2014-04-28 10:53:18',
|
||||
ui_color: 'high-priority',
|
||||
ui_icon: 'important',
|
||||
name: '4 high',
|
||||
id: '4'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue