Import Issues

Added by Alessandro Maggi over 13 years ago

I'm looking for a way to import issues from my old tool (cvstrac) into redmine.

I tried redmine importer plugin but it seems not to work with files bigger than 2300 bytes.

I also tried to push new tickets into redminedatabase with a query, but for some reason (i'm a very newbie to redmine and also to ruby/rails) red mine stop working. All fields seem proberly set, but may be there are checks of ticket number or whatever...

Can anybody help me ?


Replies (39)

RE: Import Issues - Added by Leo Hourvitz about 13 years ago

Hi Francois,

There's no problem with custom fields in general, in fact the samples include a custom field example. I only brought it up because one of the things that the code which prints that error is doing is processing custom fields. Do you mind listing what your custom fields are called, and whether or not you're trying to import their values?

In the meantime I'll try and get a Redmine 1.2 set up, which is the other likely source of the problem.


RE: Import Issues - Added by Leo Hourvitz about 13 years ago

By any chance do you have a custom field that uses the new User or Version types introduced in Redmine 1.2? I tried testing with those and you don't seem to be able to import those columns at the moment, although I still couldn't reproduce your bug report.

RE: Import Issues - Added by Francois Mace about 13 years ago

Hello Leo,

For the moment, I have not used the the new user type but I indeed have enabled the version type.

However, just as notes:

  • the error report I sent you was based on a test I did with the example csv files you are providing with the release of the redmine_import plugin present on your github.
  • when I do the import, I do not obtain the page allowing to select the fields, it crashes as soon as I hit the "upload file" button at the bottom of the page

Let me know if you need any other information to reproduce this.

RE: Import Issues - Added by R W about 13 years ago


I've been using your importer with some success under Redmine 1.2 but with my latest import file some rows are failing and it's hard to work out why.

After running the import I am presented with a list of the failed rows but there doesn't seem to be any explanation of why the rows have failed - is there any more information available e.g. in a log file somewhere? I've currently got a file of 1000 issues from which 460 import ok and 540 are rejected but I can't really see a lot of difference between the successful and failed rows

RE: Import Issues - Added by Leo Hourvitz about 13 years ago

Hi Francois,

I've spent some time testing with 1.2 and custom fields and have been unable to reproduce your problem. In general 1.2 seems to work OK for me. When you update issues I encounter a possible problem in generating the email, but that only happens long after the problem you're describing. That's why I asked if you could provide a description of your custom fields. Are you running with Redmine 1.2 release version or some version of trunk?

At this point I really can't get any behavior like what you're describing to occur, so while I understand you're having a severe problem I need more information to be able to help.

Hi R W,

No, there's really no other information available. Almost all cases where rows fail are a problem with not specifying the unique-valued column and/or the values in that column correctly, there are very few other reasons a record import can actually fail. Can you provide a sample CSV and a description of any custom fields or other configuration options you've set? Again, I would look carefully at the documentation about unique-valued columns as that's the most likely source of misconfiguration or problematic values in the CSV.


RE: Import Issues - Added by Thomas Martin almost 13 years ago


I have a question for you Leo.
I was wondering if it's possible to tweak the Importer plugin to make the match-making from columns to fields easier. Let me explain myself :
I want to import daily two files with many columns into redmine using the importer. I cannot change the titles of the columns as some other apps are using those so it would mess everything up and I cannot make all the names of the fields in redmine to match the titles of the columns in excel (most of them yes but not all). So I would need the match-making to automatically match column x with field y, even though the names do not match is that possible ?


PS: I know it's probably not the right place to ask this but I didn't know where else, sorry.

RE: Import Issues - Added by Leo Hourvitz almost 13 years ago

Hi Tom,

As I always say, "It's software so nothing is impossible." However, I'm not sure putting a feature like that in the plugin would be the best approach. Do you have access to any other scripting languages? My first thought would be to try to solve this problem by having a script process the CSV file and change the column headers before you do the upload. It would be a very quick script in Python, Ruby, or pretty much any language with a proper CSV library.


P.S. Hmm, you can send me messages on GitHub but yeah, it's not clear where the "right" place for a bb discussion is... I guess this thread will have to do!

redmine 500 error - Added by JG Patrick almost 13 years ago

Using the AllStandardFields.csv file, I have an error.

Processing ImporterController#match (for at 2011-08-29 13:45:19) [POST]
  Parameters: {"encoding"=>"U", "commit"=>"Upload File", "project_id"=>"5", "action"=>"match", "authenticity_token"=>"nUkYDVQ4eMn4tOOLU1sO0aoMwCekU4B4RKKmq/m0wnY=", "controller"=
>"importer", "file"=>#<File:/tmp/RackMultipart20110829-1632-qifz6t-0>, "splitter"=>",", "wrapper"=>"\""}

ActiveRecord::StatementInvalid (Mysql::Error: Table 'railsapp_production.import_in_progresses' doesn't exist: DELETE FROM `import_in_progresses` WHERE (user_id = 3) ):
  vendor/plugins/redmine_importer/app/controllers/importer_controller.rb:25:in `match'

Any thoughts about what might be generating this.

I have installed fastercsv and i18n gems.

Thanks in advance.

RE: Import Issues - Added by Leo Hourvitz almost 13 years ago

Hi JG,

That's exactly the message you would get if you didn't run the

rake db:migrate_plugins

command after installing redmine_importer (the third step mentioned in the README). Is there any chance that's the problem?

Also, depending on how you're invoking things, you might need a


or equivalent to make the migration gets run in your production environment...


RE: Import Issues - Added by JG Patrick almost 13 years ago

Thanks very much. This was the issue. The instructions show only "Run 'rake db:migrate_plugins'" I needed the environmental variable RAILS_ENV=production. To set that, I was not successful until I used the export command.

export RAILS_ENV=production

Many thanks for watching this. The plug-in will be essential for us.

RE: Import Issues - Added by JG Patrick almost 13 years ago

Hi Leo,

I am having the same problems with import that are mentionned above. There does not seem to be a good reason, and I am NOT using any unique fields. I have a small file with 60 issues. The import stops working at about 44.

I can send along sample lines. I am concerned that this might be a bug.

Best regards,
JG Patrick

RE: Import Issues - Added by bin dong over 12 years ago

hi leo,
I think i have installed the plugin well,and didn't have problems above.
when i export the issue list from the issue page,i import the csv file after translate the format of the file to utf8,it already works .but it seems that it can't recognize the user or the assignee field .it reports the error like:
When adding issue 1 below, the User xxxxx was not found

best regards,

RE: Import Issues - Added by bin dong over 12 years ago

I have solved the problem,i just change the "author" and "assigned to" to be the relative login name .it's just ok!

RE: Import Issues - Added by john milton over 12 years ago

To install:

Prerequisites: You’ll need the fastercsv gem (‘gem install fastercsv’ as root). Versions 1.4 through 1.5.3 are tested.

Download the plugin to your vendors/plugins directory. Be sure to maintain the correct folder name, ‘redmine_importer’.

Go to the Admin/Projects/../Modules . .

and next i am trying to know how it is happening