Index: migrate_from_trac.rake =================================================================== --- migrate_from_trac.rake (révision 2263) +++ migrate_from_trac.rake (copie de travail) @@ -518,9 +518,11 @@ # 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