Project

General

Profile

Patch #2506 ยป import_trac_no_custom_field_double.diff

Jm Delehaye, 2009-01-14 09:45

View differences:

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
    (1-1/1)