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
This commit is contained in:
parent
180fe8f6a4
commit
7fb72e671b
|
@ -324,8 +324,9 @@ namespace :redmine do
|
||||||
:is_filter => true) if r.nil?
|
:is_filter => true) if r.nil?
|
||||||
r.trackers = Tracker.find(:all)
|
r.trackers = Tracker.find(:all)
|
||||||
r.projects << @target_project
|
r.projects << @target_project
|
||||||
r.possible_values = %w(fixed invalid wontfix duplicate worksforme)
|
r.possible_values = (r.possible_values + %w(fixed invalid wontfix duplicate worksforme)).flatten.compact.uniq
|
||||||
custom_field_map['resolution'] = r if r.save
|
r.save!
|
||||||
|
custom_field_map['resolution'] = r
|
||||||
|
|
||||||
# Tickets
|
# Tickets
|
||||||
print "Migrating tickets"
|
print "Migrating tickets"
|
||||||
|
|
Loading…
Reference in New Issue