redmine_importer 0.3.1
Download
Though, I’m a newbie in Ruby and RoR development. But after 4-5 hours googling, I decided write a Redmine import plugin for those tons of issues in Excel. So, I downloaded Redmine source code, Aptana Studio, then learn how to program with Ruby and RoR…
Finally, I built a plugin named redmine_importer, and it works. Thanks to the 1st user, my colleague, Vince Zhang
redmine_importer 0.3.1 features:
- Import CSV file, user define split and wrap character
- User define CSV column and issue field mapping
- Update exsit issues by user defined unique field
- Ignore none-exsitent issue, avoid re-update closed issue
- As a project’s module, can configured by project manager
- L10n, with English and Chinese locale
Install
- Make sure you have “fastercsv” gem installed(vertion 1.4.0 is tested): #gem install fastercsv
- Extract .zip file to “redmine/vendor/plugins/”
- restart your redmine, do some config in permission settings.
Tested in Redmine 0.8.2
Enjoy!
Screenshot

Hi,
I am trying to use your brilliant plug-in but I face an big nice error 500, I have posted a comment on the thread in the Redmine forum: http://www.redmine.org/boards/2/topics/2817
Thanks for your help
You should install “fastercsv” gem. I forgot to notice this dependence in the installation guide.
Commonly, you can install this gem by run:
# gem install fastercsv
Thanks for your attention!
Hello,
First of all thank you very much for your wonderful application.
Second, I could manage to export a CSV file from Redmine and use it in another project, as a template, but I could not export the CSV file generated from MS project to redmine, it says: “Illegal quoting on line 3.”
I have manage to create all the header, exactly as CSV from redmine, in the project file, but it still does not work, could you give me a hand on that matter? Thank you very much.
I guess that because fastercsv cannot recognize your locale character (Sorry, I don’t have a MS project installed, can you send me a snippet of the CSV file?).
Try convert the CSV file to UTF-8 encoding and import again.
- You can open the CSV file by notepad, and “Save As…” in UTF-8 encoding.
- If you use UNIX like system or Cygwin, you can convert CSV file by
# iconv -f iso-8859-1 -t utf8 YOUR_CSV_FILE CSV_UTF8
Thank you for your patience!
Hey Fernando
You should be able to get through that error if you set the file format to be Mac (open up the csv in Notepad++ and click the Format menu, select Convert to Mac Format). I think this changes the return line type.
Martin – I had the same problem as fernando and once I resolved that I got the error below…. I set all the fields I could in the csv (except id). Can you show us some example files for this plugin?
Many thanks.
NoMethodError in Importer#result
Showing vendor/plugins/redmine_importer/app/views/importer/result.html.erb where line #6 raised:
undefined method `-’ for nil:NilClass
Extracted source (around line #6):
3:
4:
5:
6:
7:
8:
9: :
RAILS_ROOT: C:/Redmine/apps/redmine
Application Trace | Framework Trace | Full Trace
vendor/plugins/redmine_importer/app/views/importer/result.html.erb:6:in `_run_erb_47vendor47plugins47redmine_importer47app47views47importer47result46html46erb’
vendor/rails/actionpack/lib/action_view/base.rb:342:in `send’
vendor/rails/actionpack/lib/action_view/base.rb:342:in `execute’
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `send’
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `render’
vendor/rails/actionpack/lib/action_view/template.rb:35:in `render’
vendor/rails/actionpack/lib/action_view/template.rb:22:in `render_template’
vendor/rails/actionpack/lib/action_view/base.rb:248:in `render_file’
vendor/rails/actionpack/lib/action_controller/base.rb:1112:in `render_for_file’
vendor/rails/actionpack/lib/action_controller/base.rb:845:in `render_with_no_layout’
vendor/rails/actionpack/lib/action_controller/layout.rb:251:in `render_without_benchmark’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’
vendor/rails/actionpack/lib/action_controller/base.rb:1161:in `default_render’
vendor/rails/actionpack/lib/action_controller/base.rb:1167:in `perform_action_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
C:/Redmine/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_without_caching’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `send’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process’
vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `synchronize’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
C:/Redmine/ruby/bin/mongrel_rails:19:in `load’
C:/Redmine/ruby/bin/mongrel_rails:19
vendor/plugins/redmine_importer/app/views/importer/result.html.erb:6:in `_run_erb_47vendor47plugins47redmine_importer47app47views47importer47result46html46erb’
vendor/rails/actionpack/lib/action_view/base.rb:342:in `send’
vendor/rails/actionpack/lib/action_view/base.rb:342:in `execute’
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `send’
vendor/rails/actionpack/lib/action_view/template_handlers/compilable.rb:29:in `render’
vendor/rails/actionpack/lib/action_view/template.rb:35:in `render’
vendor/rails/actionpack/lib/action_view/template.rb:22:in `render_template’
vendor/rails/actionpack/lib/action_view/base.rb:248:in `render_file’
vendor/rails/actionpack/lib/action_controller/base.rb:1112:in `render_for_file’
vendor/rails/actionpack/lib/action_controller/base.rb:845:in `render_with_no_layout’
vendor/rails/actionpack/lib/action_controller/layout.rb:251:in `render_without_benchmark’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render’
vendor/rails/actionpack/lib/action_controller/base.rb:1161:in `default_render’
vendor/rails/actionpack/lib/action_controller/base.rb:1167:in `perform_action_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
C:/Redmine/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_without_caching’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `send’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process’
vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `synchronize’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run’
C:/Redmine/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
C:/Redmine/ruby/bin/mongrel_rails:19:in `load’
C:/Redmine/ruby/bin/mongrel_rails:19
Request
Parameters:
{“project_id”=>”6″,
“commit”=>”Submit”,
“fields_map”=>{“Status”=>”status”,
“Subject”=>”subject”,
“Category”=>”category”,
“Tracker”=>”",
“Assigned To”=>”assigned_to”,
“Author”=>”author”,
“Estimated Time”=>”estimated_hours”,
“Priority”=>”priority”,
“Project”=>”",
“Description”=>”description”},
“default_tracker”=>”2″}
Show session dump
—
rder: desc
:importer_tmpfile: redmine_importer.4976.6
:importer_splitter: “,”
:user_id: 1
:importer_wrapper: “”"
issuesindex_sort:
:key: id
:importer_encoding: U
flash: !map:ActionController::Flash::FlashHash
:error: Missing imported file
:query:
:project_id: 6
:id: 17
Response
Headers:
{“cookie”=>[],
“Cache-Control”=>”no-cache”}
good good!
I’m playing around with Redmine 0.8.2 on XP using SQLite. I’ve followed the installation instructions and can see the import listed in the plugins section, but that’s it. I get no Import tab. Help!
thanks
Nevermind. I was being an idiot. Don’t reply. Thanks.
Hello
I am attempting to use your plug-in and it seems to be working but with certain errors:
- the Assigned To doesn’t set the correct user – what should I be using here to get the correct user assigned to an issue?
- It doesn’t seem to be able to update some existing issues and add new issues from the same csv file. Is this possible or must new issues and existing issues be in separate csv files?
- Maybe you could make the error handling a little more clear? Instead of going to a default error page, maybe display an error so that I have an idea what is wrong with the import file (per line).
Thanks very much
OK – I see I was using first and last name for the user (as this is what is displayed on the Redmine pages) but should actually use username as defined on the administration – users page.
I had trouble getting the Assigned to attribute to work but I see you need to specify the user’s username and not their first and last name (as displayed on the Redmine pages).
Is it possible to upload a csv file with new and existing issues in it? I seem to get errors.
Thanks
The article on antibiotics are very good.
Hi !
I m trying to use the importer but i get an error (fastercsv is installed and importer copied to folder, redmine is restarted).
here is the error, any idea whats going wrong?
thanks
Michael
Processing ImporterController#match (for 172.21.13.73 at 2009-06-11 15:45:09) [POST]
Session ID: 44a04aa6e2b72042c884cd28e2a4da34
Parameters: {“project_id”=>”13″, “encoding”=>”S”, “wrapper”=>”"”, “commit”=>”Upload File”, “action”=>”match”, “controller”=>”importer”, “splitter”=>”,”, “file”=>#}
Rendering template within layouts/base
Rendering importer/match
ActionView::TemplateError (undefined method `each’ for nil:NilClass) on line #8 of importer/match.html.erb:
5:
6: <!–
7:
8:
9:
10:
11:
vendor/plugins/redmine_importer/app/views/importer/match.html.erb:8:in `_run_erb_47vendor47plugins47redmine_importer47app47views47importer47match46html46erb’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/base.rb:342:in `send’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/base.rb:342:in `execute’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/template_handlers/compilable.rb:29:in `send’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/template_handlers/compilable.rb:29:in `render’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/template.rb:35:in `render’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/template.rb:22:in `render_template’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_view/base.rb:248:in `render_file’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1112:in `render_for_file’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:845:in `render_with_no_layout’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/layout.rb:251:in `render_without_benchmark’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:51:in `render’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/benchmark.rb:8:in `realtime’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:51:in `render’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1161:in `default_render’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:1167:in `perform_action_without_filters’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:579:in `call_filters’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/rescue.rb:201:in `perform_action_without_caching’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/query_cache.rb:8:in `cache’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `send’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:529:in `process_without_filters’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/filters.rb:568:in `process_without_session_management_support’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/session_management.rb:130:in `process’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/base.rb:389:in `process’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:149:in `handle_request’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:107:in `dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:104:in `dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.2/lib/action_controller/dispatcher.rb:35:in `dispatch’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run’
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
c:/ruby/bin/mongrel_rails:19:in `load’
c:/ruby/bin/mongrel_rails:19
Rendering C:/redmine/public/500.html (500 Internal Server Error)
Hello,
I inspired by your nice plug-in, So I make user CSV import plug-in.
http://d.hatena.ne.jp/shrkw/20090611/redmine_user_import_en
Thank you so much.
I think I will try to recommend this post to my friends and family, cuz it’s really helpful.
Good Work.
I am currently working on Redmine / Task-Juggler integration
I also get error 500 on importing…
Where can i find the error log and how to fix this?
Already tryed fastercsv 1.4.0 and 1.5.0 no luck on that…
Hi,
I am having the same error..
any news?
Hi,
I am attempting to use your plug-in but I having a problem.
I already have fastercsv 1.4 but I can’t see the import tab. I can see the importer entry on Administration->Plugins but the tab isn’t there…
any idea?
thanks
Sorry!
done..
newbie user problems..
thanks
Bras,
How did you get the tab? I’m not able to find it as well
Hi,
when I click the “UPLOAD” button the server return “Internal error”.
the CSV file must have the same structure of the file exported from Redmine?
someone can halp me?
Hi,
I think you have just a problem with the rights of redmine importer file. Change this to have the same rights of other plugins files.
FYI, this plugin is broken horribly in Redmine trunk. Among the list of issues;
* l_has_string() no longer exists
+ replace with l_or_humanize(attr, :prefix=>”field_”)
* l_or_humanize() returns strings with the first letter capitalized, breaking calls to attr_maps["subject"] for example since it is “Subject” now.
+ downcase() things. Tried to get FasterCSV’s parser to use converters => :downcase like it says it should do, but it errors out instead.
* lang files have been replaced with locales, the lang files now need to reside in vendor/plugins/config/locales
* lang file format has changed from %d to {{count}} and similar. Need to update both the locale files and the views.
I believe there is more since I don’t have everything fully working, but this hopefully will give you some help getting started updating this for trunk. Email me if I can help any.
Actually, the fix was easier than I thought. I have put up a clone of this plugin at git://github.com/rchady/redmine_importer.git that works with trunk, though it is still a work in progress. Unfortunately, I could only update en.yml.
Martin, if you want to take my changes and incorporate it for a trunk usable version, go ahead.
Same error.
when I click the “UPLOAD” button the server return “Internal error”….
Hi Marin,
thanks a lot for writing this plugin. Here are some issues I ran into using it, which I think are worthwhile mentioning in order to save users some time:
1.The unicode header is not skipped (at least for UTF-8 which is the format I am using, in which case the header consists of three bytes), instead fastercsv reports an error in lline 1.
2.Only MAC line endings (CR) are accepted. UNIX (LF) or Windows (CR,LF) line endings cause errors in line 1 or 3.
Actually problems have an easy fix:
add lines
tmpfile.binmode
file.binmode
if(encoding == “U”)
file.seek(3)
end
before line 26 (if tmpfile)
and everything will work
I’m facing issue of failed rows. In one of my project i just cannot import issues. The page just says
1 issues processed. 0 issues success imported.
How do I find out what is the issue that I need to correct.
On further investigation i figured that if a project has custom columns then none of the issues gets imported. Is that a known issue? can this be incorporated in future release?
Hi
I am facing a similar issue when I try to import from a csv file.
Greatly appreciate if you can let me know if you were able to resolve the issue
Regards
Cheryan
Hi Martin!
I tried your plugin and it worked like a charm! Thank you for your work!
One thing I noticed was that it lacks e-mail notifications on import of issues (which is very important for my group).
I modified the importer_controller.rb changing rows 222-226 into:
if (!issue.save)
# 记录错误
@failed_count += 1
@failed_issues[@handle_count + 1] = row
#end
else
Mailer.deliver_issue_add(issue) if Setting.notified_events.include?(‘issue_added’)
end
I know this isn’t maybe a nice patch (if you are “a newbie in Ruby and RoR”, I am much less than that, since this is my first dive into it), but it works as I expected.
I have a simple fix for error 500:
Go to the file redmine/vendor/plugins/redmine_importer/app/controllers/importer_controller.rb and change line 70 to the following:
@attrs.sort! {|x,y| x.to_s y.to_s }
The problem is that ruby doesn’t know how to sort symbols in an array, so the code above converts the symbols to strings so that they can be compared during the sort.
Thanks for your plugin. I used it to import the issues from one Redmine implementation to another.
I finally got everything over.
Here are a couple of tips to ensure that the ID’s match between the two repositories.
Assumptions:
- the target database is a mysql database.
- there are no other projects in the target Redmine implementation
1. When you export the issues, make sure that the issues are in ascending order.
2. Massage the export file to fill the gaps of deleted issues
3. Set up the target implementation exactly like the source implementation.
4. Delete any issues in the target database using the ‘delete from issues’ command.
5. Ensure that the issues auto-increment numbering is reset using the ‘alter table issues auto_increment = 1′ command
hi martin,
i’m stuck with below error, pls help
ActionView::TemplateError (undefined method `-’ for nil:NilClass) on line #6 of importer/result.html.erb:
3:
4:
5:
6:
7:
8:
9: :
This plugin is really good, but using it did not work for me immediately. I encountered FasterCSV parsing errors and I miss a german localization. I’m running Redmine 0.8.7.stable on Mac OS X with Apache and Phusion/Passenger and Enterprise Ruby 1.8.7.
Therefore I did the fixes (binmode) mentioned above and added German localization. You can find the resulting plugin here:
http://github.com/chnoack/Redmine-Importer-Fixes
missing lang when work with redmine-0.9-stable (svn: 3334)
translation missing: zh, label_importer
translation missing: zh, label_issue_importer
…..
redmine-importer version:
http://www.martinliu.info/wp-content/uploads/2009/04/redmine_importer-031.zip
Hi Martin!
), all works as expected.
It’s me again…
I found a problem in your plugin when using it inside a mongrel_cluster with apache2 as a proxy balancer. As I tried to understand, when importing a csv in such an environment, there is a chance that between the first step of the import (that is, uploading the file) and the second one (submitting the mappings between header fields and issue attributes), the balancer decides to swap your request to another node of the cluster. When this happens, the plugin loses its handle on the file previously saved – of course, when there is just a node involved in the cluster (besides not being a true cluster…
I think this is related to the fact you are using a global variable Hash to store the handle to the file: my guess is that when the balancer swap to another node of the cluster, that variable in that node may not be initialized and, even if it is, doesn’t know anything about the file you uploaded on the other node.
I don’t know if this is a configuration issue of the proxy balancer or not, but I came to a patch on import_controller.rb:
I stored in session File.dirname(tmpfile.path), too, and then get it from session inside method result; then, instead of making
tmpfile = $tmpfiles[tmpfilename]
(which is the line that raises error)
I put
tmpfile = File.open(tmpfiledirname + “/” + tmpfilename)
where, of course, tmpfiledirname is the value I stored in session.
Now, like my previous comment, I don’t expect this to be a perfect patch, but until now it works. Hope this helps…
“restart your redmine, do some config in permission settings”
Wow, thanks for the clear directions. Let me google “some config” and see what I can find.
Hi Martin, i was looking for the import of .csv into redmine and i found your plugin but when i tried it i had this problem (after the click on the button_upload)…
———————————————————————————–
vendor/rails/activesupport/lib/active_support/dependencies.rb:493:in `const_missing’
vendor/plugins/redmine_importer/app/controllers/importer_controller.rb:49:in `match’
vendor/rails/actionpack/lib/action_controller/base.rb:1166:in `send’
vendor/rails/actionpack/lib/action_controller/base.rb:1166:in `perform_action_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:579:in `call_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:572:in `perform_action_without_benchmark’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure’
vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue’
vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in `perform_action_without_caching’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action’
vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache’
vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache’
vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `send’
vendor/rails/actionpack/lib/action_controller/base.rb:529:in `process_without_filters’
vendor/rails/actionpack/lib/action_controller/filters.rb:568:in `process_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:130:in `process’
vendor/rails/actionpack/lib/action_controller/base.rb:389:in `process’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:149:in `handle_request’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:107:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `synchronize’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:104:in `dispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:120:in `dispatch_cgi’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:35:in `dispatch’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:76:in `process’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `synchronize’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/rails.rb:74:in `process’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:159:in `process_client’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `each’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:158:in `process_client’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `initialize’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `new’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:285:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `initialize’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `new’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel.rb:268:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:282:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `each’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/configurator.rb:281:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:128:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/command.rb:212:in `run’
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:281
C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19:in `load’
C:/Program Files/BitNami Redmine Stack/ruby/bin/mongrel_rails:19
———————————————————————————
The session dump is this :
:importer_tmpfile: redmine_importer20100223-1764-ybk4vg-0
:importer_splitter: “,”
:importer_wrapper: “”"
:user_id: 1
:importer_encoding: U
flash: !map:ActionController::Flash::FlashHash {}
Can you help me ?
Thanks, bye.
We were looking to install this plugin for evaluation on our internal Redmine server and ran into a translation issue that seems like it wouldn’t be too complicated to fix, but I haven’t looked in to how to implement the fix yet.
we’re running Redmine 0.9.2 on Rails 2.3.4.
The error we are getting is similar to the ones listed above , for example:
“translation missing: en, label_issue_importer”
Is there a fix for this, or is there one in-progress?
Thanks!
After doing some research, we solved the problem of getting this plugin to work on Redmine 0.9.x by using this fork of the plugin, which uses the new i18n API: http://github.com/rchady/redmine_importer/tree/
Tested on Redmine 1.0 works great! Thanks a lot.
Hello,
I made a small modification to match viewer (for lazy user) it try to match the column name with the field name and if equal select the appropriate field.
here is the patch hope it can help :
—————–
### Eclipse Workspace Patch 1.0
#P redminePluginTicketImport
Index: src/issues_importer/app/views/importer/match.html.erb
===================================================================
— src/issues_importer/app/views/importer/match.html.erb
+++ src/issues_importer/app/views/importer/match.html.erb
@@ -14,8 +14,14 @@
+
:
- <%= select_tag "fields_map[#{column}]", "#{l(:option_ignore)}” + options_for_select( @attrs ) %>
+
+ <%= select_tag "fields_map[#{column}]", "#{l(:option_ignore)}” + options_for_select( @attrs , matchedsel) %>
I forked rchady’s fixes and fixed both the header matching problem that Gilles mentions and the doesn’t-run-in-deployment problem that Luca mentions; the plugin seems functional in all testing so far under both webrick and multi-process under Apache. I’m testing with Redmine-1.0.1.
I couldn’t get Gilles’ patch (above) to work so I have a different fix in that same place to make column names line up when possible and made the comparison case-insensitive etc. For the threading problem, I avoided temp files entirely and put the data in the session until the next call.
My git fork is at
git://github.com/leovitch/redmine_importer.git
if it’s helpful for anyone.
Hi, thanks for this almost-life-saving plug-in. Could you please elaborate your instruction “do some config in permission settings”. I am using Redmine 0.9.4 on Windows and I just installed as per instructions (including the fastcsv) and after I click on “Upload File” button, I get the “Internal Error” screen. Thank you for any help.
Hi, I’m using your great plugin and it really adds a very usefull feature to redmine. Unfortunately I have no idea about how to use the “Select field as journal:” dropdown. And i’ve got another question about the ignore Ignore “none exist issues” checkbox. Does this mean, that issues existing in file only will be ignored, or vice versa?
Btw. I’m planing to write a german localization and will upload it here when I have finished.
Hello.
I’m beginner and I need your help.
We tried redmine_importer 0.3.1 by Redmine 1.0.3.
But importer could not work.
We found “translattion missing: ja, label_import” in project menu.
If you can, could you please tell me solutions?
Hello.
I’m beginner therefore I need your help.
We tried redmine_importer 0.3.1 by Redmine 1.0.3.
But importer could not work.
We found “translattion missing: ja, label_import” in project menu.
If you can, could you please tell me solutions?
Unfortunately, this plugin is causing Redmine to issue “internal error” messages with few other clues: http://www.redmine.org/issues/7094
I’d be happy to send the CSV file in question so you can reproduce the error if you contact me at dave@boostpro.com.
Thanks!
FYI, fixes to the plugin available in the fork at https://github.com/leovitch/redmine_importer fixed my woes.