diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-21 21:37:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-21 21:37:40 +0000 |
commit | 7fb72e671b867eefd4ce57ba6b4e69564cbce7a9 (patch) | |
tree | 2708bb440f1d25e4711e02a39bd79cd625c77de9 /lib | |
parent | 180fe8f6a47e85357bda2e6b22832c0635d209e4 (diff) | |
download | redmine-7fb72e671b867eefd4ce57ba6b4e69564cbce7a9.tar.gz redmine-7fb72e671b867eefd4ce57ba6b4e69564cbce7a9.zip |
Trac importer: prevent validation failure due to the default value when saving the Resolution custom field if it already exists (#869).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1286 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index 2308e787b..0f116328f 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -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" |