Project

General

Profile

Attempting to import from Merant Tracker

Added by Paul Kudrle about 16 years ago

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[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8])  
        @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.

Paul


Replies (1)

RE: Attempting to import from Merant Tracker - Added by Mark Thomas about 16 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)

    (1-1/1)