Attempting to import from Merant Tracker
I am trying to import some data from our own defect tracker into Redmine. I am trying to create a Rake task but I very new to Rake tasks. I am getting the following error:
rake redmine:migrate_from_merant_tracker RAILS_ENV="production" (in /Sites/redmine) Attempting Migration from Merant Tracker Migrating ticketsrake aborted! uninitialized constant Issue /Sites/redmine/rakefile:10 (See full trace by running task with --trace)
Here is my code:
puts "Attempting Migration from Merant Tracker" namespace :redmine do desc 'Merant Tracker migration script' task :migrate_from_merant_tracker => :environment do CSV.open('Sites/redmine/lib/tasks/issues.csv', 'r') do |row| @tempMT = MerantTracker.new(row,row,row,row,row,row,row,row,row) @i = Issue.new :project => Project.find_by_id(1), :start_date => "2000-01-01", :subject => @tempMT.subject, :description => @tempMT.input_id, :tracker => find_by_id(1), :status => IssuesStatus.find_by_id(5), :author => Users.find(3), :priority => Enumeration.find_by_id(3) @i.save end end end
Can anyone help? Much appreciated. We want to use redmine at work but would like to be able to import some of our old data.
RE: Attempting to import from Merant Tracker - Added by Mark Thomas over 13 years ago
The file itself looks OK.
Is it named xxx.rake and in the tasks directory?
(P.S. Would like to see your MerantTracker class)