Patch #2506 ยป import_trac_no_custom_field_double.diff
| migrate_from_trac.rake (copie de travail) | ||
|---|---|---|
|
# Custom fields
|
||
|
ticket.customs.each do |custom|
|
||
|
next if custom_field_map[custom.name].nil?
|
||
|
v = CustomValue.new :custom_field => custom_field_map[custom.name],
|
||
|
:value => custom.value
|
||
|
v = CustomValue.find(:first, :conditions => { :customized_type => 'Issue', :customized_id => i.id, :custom_field_id => custom_field_map[custom.name].id })
|
||
|
v ||= CustomValue.new :custom_field => custom_field_map[custom.name],
|
||
|
:value => custom.value
|
||
|
v.customized = i
|
||
|
v.value = custom.value
|
||
|
next unless v.save
|
||
|
migrated_custom_values += 1
|
||
|
end
|
||