MS Project 2007 Import/Export plugin

Added by Sergey Sobolev about 4 years ago

Based on the redmine_loader plugin, it can
  • Import tasks from MS Project xml file
  • Export project from Redmine as xml file
  • Update existing Redmine project with values from previously exported MS Project xml file

This version is not supported

Code is available at: http://github.com/vile/redmine_loader
Issue tracker: http://github.com/vile/redmine_loader/issues

Replies (28)

RE: MS Project 2007 Import/Export plugin - Added by Bruno Medeiros almost 4 years ago

Is it possible to add this plugin to the new redmine plugin directory?

RE: MS Project 2007 Import/Export plugin - Added by Terence Mill over 3 years ago

I ony have mpp files as export from Ms Project, but the plugin only read xml. How do i export MPP to XML fromat in MsProject?

RE: MS Project 2007 Import/Export plugin - Added by Bruno Medeiros over 3 years ago

Just open the mpp file on MS Project and "Save as..." XML.

RE: MS Project 2007 Import/Export plugin - Added by Michael Wagener over 3 years ago

Hi:

I am not a RUBY expert, but I have been using Redmine as a PM tool for sometime now and I like it. I am hover experiencing some trouble when it comes to importing project plans from MS Project in XML format. The import works until I try to save and then it gives the following me the following messages:

Application error
Rails application failed to start properly

Followed, on refresh, by

Errorundefined method `[]' for nil:NilClass

So this is a bit frustrating to say the least. It imports some, but not all of the project tasks.

What I have done so far is to try different hardware platforms up to a Core 2 Duo processor / 1Gig with no difference. My standard platform at the moment is a Pentium D 2.8GHz with 2Gigs of RAM and plenty of disk space.

I would be grateful for some guidance/feedback. Thank you.

Kind regards,

Michael

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

Do you can provide some logs info?

log/development.log
or
log/production.log

with trace of this error?

Thanks

RE: MS Project 2007 Import/Export plugin - Added by Michael Wagener over 3 years ago

Hi:

We seem to have cured our problem by bypassing Apache and using Mongrel - seems like Apache tends to get a little stretched for some reason and then times out causing the imports to fail. A downside is that the system is slightly slower, but the plus is that it does not fail.

RE: MS Project 2007 Import/Export plugin - Added by Michael Wagener over 3 years ago

Hi:

I have noticed that the import does not bring in issue assignments set up using our project management tool - that is a bit of a problem - there is another product that does - taskadapter - but I was kind of hoping that the MS Project import would do it too. I have checked that the names used in MS Project match the user names being used in Redmine with no joy. Am I missing something that is causing this issue, or is issue assignment not supported?

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

About assignment.

Based on source:
https://github.com/vile/redmine_loader/blob/master/app/controllers/loader_controller.rb

it take from imported info field named "assigned_to":

https://github.com/vile/redmine_loader/blob/master/app/controllers/loader_controller.rb#L145

struct.assigned_to = task[ :assigned_to ]

Then here this info is adding to Issue:

https://github.com/vile/redmine_loader/blob/master/app/controllers/loader_controller.rb#L238

if ( source_issue.assigned_to != "" )
destination_issue.assigned_to_id = source_issue.assigned_to
end

I.e. if source filed "assigned_to" contain user's login, we can try to find user in Redmine by login:

User.find_by_login(login)

In this case plugin can be changes to like this:

if ( source_issue.assigned_to != "" )
  # integer - store as is
if source_issue.assigned_to.to_i != 0
destination_issue.assigned_to_id = source_issue.assigned_to
else # string - try to search user by login
user = User.find_by_login(source_issue.assigned_to) rescue nil
if user # store user's id
destination_issue.assigned_to_id = user.id
end
end
end

RE: MS Project 2007 Import/Export plugin - Added by Yaroslav Matsera over 3 years ago

Anybody can help on this issue?
https://github.com/vile/redmine_loader/issues/5

I have the same error :(

ActionView::TemplateError (undefined method `firstname' for nil:NilClass) on line #171 of vendor/plugins/vile-redmine_loader/app/views/loader/new.html.erb:

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

https://github.com/vile/redmine_loader/issues/5

Ok, there is some select list for select users.

It seems that User record not found, from here:

https://github.com/vile/redmine_loader/blob/0e3c62b9304a7f96aaceb56f72dad3c5be198656/app/helpers/loader_helper.rb#L110

userList = userList.sort { |a,b| a.firstname + a.lastname <=> b.firstname + b.lastname }

there is NIL element in userList array.

I.e. this code:

memberList.each do | current_member |
userList.push( User.find( :first, :conditions => { :id => current_member.user_id } ) )
end

Push NIL element. This is not plugin problem - there is array:

memberList = Member.find( :all, :conditions => { :project_id => project } )

what not have User. Or .user_id - nil.

Possible to try this, to ignore NIL elements:

memberList.each do | current_member |
usr = User.find( :first, :conditions => { :id => current_member.user_id } )
userList.push(usr) if usr
end

Thanks

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

Corrected:

memberList.each do | current_member |
usr = User.find( :first, :conditions => { :id => current_member.user_id } ) rescue nil
userList.push(usr) if usr
end

RE: MS Project 2007 Import/Export plugin - Added by Yaroslav Matsera over 3 years ago

Thanks!

It's work!

How I can check for 'nil' users? May be, it's groups?

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

How I can check for 'nil' users? May be, it's groups?

try

select * from members where user_id is null

then, if result empty - try to find member records what contain user_id that does not exists.

select * from members where user_id not in (select id from users)

table members store information about assignment users to projects.

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

I've seen at sources,
And you are right - error happened because of groups.

Modes User and Group are inherited from Principal model.

RE: MS Project 2007 Import/Export plugin - Added by Yaroslav Matsera over 3 years ago

Ok

Now I have error when I try import:
Unable to import tasks: Validation failed: Трекер имеет непредусмотренное значение**
(Google translate: Unable to import tasks: Validation failed: Tracker has unintended meaning)
I am using Russian (UTF-8) tracker names.

RE: MS Project 2007 Import/Export plugin - Added by Ilya N over 3 years ago

Hm,
is this happened because of new imported data?

What is the line error on error logs (this is in Redmine or in Plugin)?

In Redmine tracker name can be UTF-8 (russian), I've just tried this on test installation.

Thanks

RE: MS Project 2007 Import/Export plugin - Added by Yaroslav Matsera over 3 years ago

It's happened when I press "Import selected tasks" button

It's line error - no additional info into log

May be screenshots helps?

RE: MS Project 2007 Import/Export plugin - Added by Yaroslav Matsera over 3 years ago

Ilya N wrote:

is this happened because of new imported data?

Yes, I importing new issues. And imported issue IDs present in Redmine (in other projects)

Thanks

RE: MS Project 2007 Import/Export plugin - Added by Alexey Ostrovsky over 3 years ago

I've tried that plugin and looks OK then importing.
But I don't see that update things is working.

I've just tried to import same XML file with changed "%" of task progress.
And got following error:

Unable to import tasks: Validation failed: Name has already been taken

PS: redmine version is trunk, plugin version is 0.0.11

May be I am missing something?

RE: MS Project 2007 Import/Export plugin - Added by echo girl about 3 years ago

I've tried that plugin
when I'm importing ,it's said

Unable to import tasks: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id

can anybody tell me why?

RE: MS Project 2007 Import/Export plugin - Added by Alfredo Morales about 3 years ago

Hi
How update the redmine project with XML Microsoft project update??

RE: MS Project 2007 Import/Export plugin - Added by Andrea Valle almost 2 years ago

Hi all!

Is this great plugin available also on redmine 2.x?

I tried installing it but got this error:

uninitialized constant ActiveSupport::CoreExtensions
/opt/redmine-2.2/plugins/redmine_loader/init.rb:29
/opt/redmine-2.2/lib/redmine/plugin.rb:73:in `instance_eval'
/opt/redmine-2.2/lib/redmine/plugin.rb:73:in `register'
/opt/redmine-2.2/plugins/redmine_loader/init.rb:3
/opt/redmine-2.2/lib/redmine/plugin.rb:130:in `load'
/opt/redmine-2.2/lib/redmine/plugin.rb:121:in `each'
/opt/redmine-2.2/lib/redmine/plugin.rb:121:in `load'
/opt/redmine-2.2/config/initializers/30-redmine.rb:12
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:588
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587:in `each'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/engine.rb:587
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `run_initializers'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `send'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
/opt/redmine-2.2/config/environment.rb:14
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:103:in `require_environment!'
/var/lib/gems/1.8/gems/railties-3.2.9/lib/rails/application.rb:297:in `initialize_tasks'
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment

My configuration is:

Environment:
  Redmine version                          2.2.0.stable
  Ruby version                             1.8.7 (x86_64-linux)
  Rails version                            3.2.9
  Environment                              production
  Database adapter                         MySQL
Redmine plugins:
  extended_fields                          0.2.1
  redmine_dnoise_workload                  0.0.1
  redmine_importer                         1.0
  redmine_plugin_views_revisions           0.0.1
  redmine_xls_export                       0.2.1

Otherwise, does anyone know an alternative solution for redmine 2.x?

Thank you.

RE: MS Project 2007 Import/Export plugin - Added by Andrea Valle over 1 year ago

Hi, thank you for the response.

I tried 'task adapter', but it has one limitation to me: it does not support custom fields.

I cannot specify mapping between 'project text' <--> 'redmine custom field'.

I'm investigating right now the port of redmine_loader on redmine 2.x i.e. the one at:
https://github.com/igloo15/redmine_loader

RE: MS Project 2007 Import/Export plugin - Added by Timo Bruderek 2 months ago

Hi all,

i tried to install this plugin on redmine 2.3.1.
The migration shows an error and i have to remove the line: "Issue.__send__(:include, IssuePatch)" from init.rb

I can upload and analyze this data. If i click import, all seems fine but no issues will be imported ...
Where can i see some log messages or error reporting ?

Thanks a lof for help,
Timo

1 2 (1-25/28)