]> source.dussan.org Git - redmine.git/commitdiff
Trac importer: prevent validation failure due to the default value when saving the...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 21 Mar 2008 21:37:40 +0000 (21:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 21 Mar 2008 21:37:40 +0000 (21:37 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1286 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_trac.rake

index 2308e787b50d2569bdb9b4095fe0432f44023a4e..0f116328f555f7a801bf01a64b60fb533ea7d834 100644 (file)
@@ -324,8 +324,9 @@ namespace :redmine do
                                  :is_filter => true) if r.nil?
         r.trackers = Tracker.find(:all)
         r.projects << @target_project
-        r.possible_values = %w(fixed invalid wontfix duplicate worksforme)
-        custom_field_map['resolution'] = r if r.save
+        r.possible_values = (r.possible_values + %w(fixed invalid wontfix duplicate worksforme)).flatten.compact.uniq
+        r.save!
+        custom_field_map['resolution'] = r
             
         # Tickets
         print "Migrating tickets"