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 ?
Thanks
Replies (39)
RE: Import Issues - Added by Felix Schäfer over 13 years ago
Alessandro Maggi wrote:
I tried redmine importer plugin but it seems not to work with files bigger than 2300 bytes.
That seems odd. What plugin was that?
Also: have you googled to see if someone hasn't already created an importer from cvstrac to Redmine?
RE: Import Issues - Added by Alessandro Maggi over 13 years ago
Felix Schäfer wrote:
Alessandro Maggi wrote:
I tried redmine importer plugin but it seems not to work with files bigger than 2300 bytes.
That seems odd. What plugin was that?
I found it on github rchady redmine_importer. I can't attach the link here (If I try my post is refused, server says that appears to be spam)
Also: have you googled to see if someone hasn't already created an importer from cvstrac to Redmine?
Of course I did but found nothing helpful.
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi Alessandro,
I forked RChady's importer and made all sort of fixes and enhancements to it including eliminating size restrictions. I'm in the network of RChady's importer, or you can go to my GitHub page at https://github.com/leovitch/redmine_importer. See the installation instructions -- you'll need to do a db migration after installing.
There's a manual for the plugin on the Github wiki as well. Currently it has German, Portuguese, Japanese, and Chinese localizations. Spanish anyone? ;-)
Let me know if you find any problems, I'm definitely trying to keep this in good shape.
Leo
RE: Import Issues - Added by Alessandro Maggi over 13 years ago
Thank you Leo.
I tried your fork one month ago. It had some trouble upgrading the database, so I had to create the table by myself.
After that, the plugin did the job without any trouble.
BTW. I can speak Italian, French and Spanish. If you wish I could help you with missing localisation, but only if it's not very time consuming.
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi Alessandro,
Thanks for the update. If you get a chance to do any of the localizations that would be great! The English locale file is at https://github.com/leovitch/redmine_importer/blob/master/config/locales/en.yml; there's only 32 strings at the moment. If you have a chance to translate that you can just send the result as a message on github or post it to this discussion thread and I'd be happy to integrate them.
If you ever get a chance to reproduce the migration problem please let me know what the error message was -- I've been able to use the db:migrate_plugsins task on several different installations but you know how testing is.
Glad to hear it worked for you!
RE: Import Issues - Added by Ilia S over 13 years ago
Hi Leo,
I am getting error 500 using your plugin.
Log file says
......
FasterCSV::MalformedCSVError (Illegal quoting on line 1.):
lib/faster_csv.rb:1626:in `shift'
lib/faster_csv.rb:1608:in `each'
lib/faster_csv.rb:1608:in `shift'
lib/faster_csv.rb:1575:in `loop'
lib/faster_csv.rb:1575:in `shift'
lib/faster_csv.rb:1520:in `each'
vendor/plugins/redmine_importer/app/controllers/importer_controller.rb:45:in `match'
passenger (3.0.5) lib/phusion_passenger/rack/request_handler.rb:96:in `process
.................................
gems
fastercsv (1.5.4)
i18n (0.5.0, 0.4.2)
Thanks
Ilia
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi Ilia,
Are you sure your CSV file was written out in UTF-8 encoding? If you definitely used UTF-8 when writing it out, see if you can successfully import the CSV file into OpenOffice Calc speifying UTF-8 as the input encoding.... fastercsv is a standard module that was used for the plugin, so it looks at first glance like there's something unexpected about the CSV file itself.
Leo
RE: Import Issues - Added by Ilia S over 13 years ago
Hi Leo,
Thanks to your fast reply!
I am testing with your test file AllStandardFields.csv.
After playing with encoding I got the error below.
Can it be problem with i18n gem?
ActionView::TemplateError (missing interpolation argument in "Display all lines of %{original_filename}:" ({:value=>"CustomField.csv"} given)) on line #67 of vendor/plugins/redmine_importer/app/views/importer/match.html.erb: 64: 65: <hr/> 66: 67: <%= l(:label_toplines, @original_filename) %> 68: <table class="list"> 69: <thead><tr> 70: <% @headers.each do |column| %>
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi Ilia,
Good thought about the i18n gem. There are a number of reports about the i18n gem on the forums here, and when I upgraded to Redmine 1.1 on my local machine I remember having to patch something with i18n. I can't find exactly which bug report on this site I followed; I'll keep looking, but FWIW my local system has:
i18n (0.4.2)
fastercsv (1.5.3)
Leo
RE: Import Issues - Added by Ilia S over 13 years ago
Hi Leo,
Finally, I found a problem.
It was label_toplines label defined as in your plugin , as in some other plugin( redmine_user_export.)
After deinstalling redmine_user_export problem was solved.
Ilia
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Ah, thanks for the report Ilia. That came up once before with a plugin that been forked from redmine_importer. I'll try to change the label name when I get a chance, but of course that won't protect from people who fork in the future!
RE: Import Issues - Added by gnaanaa siva over 13 years ago
Hi Leo,
I'm getting the 500 error on the upload part of the importer.
The error message on redmine log file is given below.
I used the AllStandardFields.csv file for testing.
fastercsv 1.5.4, i18n 0.5.0 redmine 1.0.0
@
noclmsapp71v:/home/nlbvalsg/bin/redmine-1.0.0 # tail log/production.log
2: <%= stylesheet_link_tag 'importer', :plugin => 'redmine_importer' >
3: < end >
4:
5: <h2><= l(:label_match_columns) %></h2>
vendor/plugins/leovitch-redmine_importer-9d051c1/app/views/importer/match.html.erb:2
app/helpers/application_helper.rb:764:in `content_for'
vendor/plugins/leovitch-redmine_importer-9d051c1/app/views/importer/match.html.erb:1
Rendering /home/nlbvalsg/bin/redmine-1.0.0/public/500.html (500 Internal Server Error)
@
i don't have redmine_user_export either. could you please advice any changes to make?
Thank you.
gnaanaa
RE: Import Issues - Added by gnaanaa siva over 13 years ago
Sorry,
This is the full error message
Processing ImporterController#match (for 10.14.11.96 at 2011-05-20 11:54:31) [POST] Parameters: {"encoding"=>"U", "commit"=>"Upload File", "project_id"=>"9", "action"=>"match", "authenticity_token"=>"IBJnfsWrXCwRen1OnazCnOUf3OQ7D/p+QAUkQO 3xGOo=", "controller"=>"importer", "file"=>#<File:/tmp/RackMultipart20110520-32502-8zn9wa-0>, "splitter"=>",", "wrapper"=>"\""} Rendering template within layouts/base Rendering importer/match ActionView::TemplateError (No plugin called 'redmine_importer' - please use the full name of a loaded plugin.) on line #2 of vendor/plugins/leovitch-redmine _importer-9d051c1/app/views/importer/match.html.erb: 1: <% content_for :header_tags do %> 2: <%= stylesheet_link_tag 'importer', :plugin => 'redmine_importer' %> 3: <% end %> 4: 5: <h2><%= l(:label_match_columns) %></h2> vendor/plugins/leovitch-redmine_importer-9d051c1/app/views/importer/match.html.erb:2 app/helpers/application_helper.rb:764:in `content_for' vendor/plugins/leovitch-redmine_importer-9d051c1/app/views/importer/match.html.erb:1 Rendering /home/nlbvalsg/bin/redmine-1.0.0/public/500.html (500 Internal Server Error)
RE: Import Issues - Added by gnaanaa siva over 13 years ago
Its working now, I need to change the folder name to 'redmine_importer'.
Thank you. Its a wonderful plugin.
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi gnaanaa,
Thanks for posting the resolution. I added a little note to the README file at https://github.com/leovitch/redmine_importer to help make sure other people don't run into that.
Leo
RE: Import Issues - Added by Steven Wong over 13 years ago
Hi, Ilia
I have the same problem.
could you tell me how to deinstall redmine_user_export?
Thanks so much.
Ilia S wrote:
Hi Leo,
Finally, I found a problem.
It was label_toplines label defined as in your plugin , as in some other plugin( redmine_user_export.)
After deinstalling redmine_user_export problem was solved.Ilia
RE: Import Issues - Added by Ilia S over 13 years ago
Just delete redmine_user_export directory and restart web server
Ilia
RE: Import Issues - Added by Steven Wong over 13 years ago
thanks a lot,
and I tried again.
But.....there's still a error infomation:
[Unique field must be specified]
T_T"""
what the problem~~
anyone have the same problem with me?
thanks
RE: Import Issues - Added by Steven Wong over 13 years ago
and another problem....
the filename display the "%S" when I used the Chinese UI.
and then I changed UI into English, it's display the file name correctly.
Maybe the importer plug-in has the localization bug? And anyone who knows how to solve it?
thanks.
RE: Import Issues - Added by Steven Wong over 13 years ago
I have found the problem.
you should install the fastcsv.
use the command
gem ininstall fastcsv.
Oh, god~~
thanks everyone's help...
RE: Import Issues - Added by Steven Wong over 13 years ago
Steven Wong wrote:
I have found the problem.
you should install the fastcsv.
use the command
gem ininstall fastcsv.
Oh, god~~
thanks everyone's help...
But, still
the Chinese language still contains error...
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
Hi Steven,
I updated the zh.yml file so that you should at least be able to get through the basic operations without seeing any errors or %s strings. I don't write Chinese so I couldn't fix up the three missing strings in the confirmation screen! If you or anyone can post them I'll be happy to add them to the file. The Chinese localization was done before I was involved with the plugin.
I also updated the README to remind people about installing fastercsv! Sorry I missed that, I had to install it way back when I was just getting started with Ruby.
Updated version at https://github.com/leovitch/redmine_importer as usual.
Leo
RE: Import Issues - Added by Francois Mace over 13 years ago
Hello Leo,
I am running into an issue which seems not to be related to the UTF formatting, to the name of the folder or to any issue covered hereabove, and I hope you can help me solve it.
When I hit the "upload file" button available with your plugin, I generate the following error:
NoMethodError in ImporterController#match undefined method `<=>' for :priority:Symbol
The complete stack dump and information on installed gems and plugins is available in the attached txt file.
Please let me know if you need anything else.
Cheers,
Francois
RE: Import Issues - Added by Leo Hourvitz over 13 years ago
No immediate clues, but I haven't been testing on 1.2. I'll try to get that set up and see if it's a version thing.
Just in case, do you have custom fields defined in your installation? From looking at the code, that seems like the other possibility (remote though it may be).
Leo
RE: Import Issues - Added by Francois Mace over 13 years ago
Indeed, I have custom fields defined in my install.
Any possibility to get around that?
BTW, thanks for the quick answer.