next unless i.save\r
issues_map[bug.id] = i.id\r
print '.'\r
+ STDOUT.flush\r
\r
# Assignee\r
# Redmine checks that the assignee is a project member\r
r.issue_to = Issue.find_by_id(issues_map[relation.destination_bug_id])\r
pp r unless r.save\r
print '.'\r
+ STDOUT.flush\r
end\r
puts\r
\r
n.author = User.find_by_id(users_map[news.poster_id])\r
n.save\r
print '.'\r
+ STDOUT.flush\r
end\r
puts\r
\r
:is_required => field.require_report?\r
next unless f.save\r
print '.'\r
- \r
+ STDOUT.flush\r
# Trackers association\r
f.trackers = Tracker.find :all\r
\r
\r
puts "WARNING: Your Redmine data will be deleted during this process."\r
print "Are you sure you want to continue ? [y/N] "\r
+ STDOUT.flush\r
break unless STDIN.gets.match(/^y$/i)\r
\r
# Default Mantis database settings\r
\r
while true\r
print "encoding [UTF-8]: "\r
+ STDOUT.flush\r
encoding = STDIN.gets.chomp!\r
encoding = 'UTF-8' if encoding.blank?\r
break if MantisMigrate.encoding encoding\r
puts
puts "This project already exists in your Redmine database."
print "Are you sure you want to append data to this project ? [Y/n] "
+ STDOUT.flush
exit if STDIN.gets.match(/^n$/i)
end
project.trackers << TRACKER_BUG unless project.trackers.include?(TRACKER_BUG)
puts "WARNING: a new project will be added to Redmine during this process."
print "Are you sure you want to continue ? [y/N] "
+ STDOUT.flush
break unless STDIN.gets.match(/^y$/i)
puts
default = options[:default] || ''
while true
print "#{text} [#{default}]: "
+ STDOUT.flush
value = STDIN.gets.chomp!
value = default if value.blank?
break if yield value