braini75 / msproject_import

Redmine-Plugin: XML-Task-Importer for MS Project
9 stars 11 forks source link

ActionView::Template::Error (undefined method `name' for nil:NilClass) #4

Closed iomode closed 9 years ago

iomode commented 9 years ago

I am using msproject_import with easyredmine (2015-07-26) v3.1.0 (based on redmine v3.1.0). Installation worked fine but when I upload a msproject xml file I get a 500 Internal Server Error. All users are correctly assigned and uploading works fine but something goes wrong afterwords. I already tried updating/cache cleaning/permissions checking but it still fails. Is this plugin compatible with redmine 3.1.0?

.....
-----------INFO:  Status: 1
.....
-----------INFO:  Status: 1
.....
-----------INFO:  Status: 1
.....
-----------INFO:  Status: 1
Rendered plugins/msproject_import/app/views/msproj_imp/analyze.html.erb within layouts/base (8.2ms)
Completed 500 Internal Server Error in 4685ms (ActiveRecord: 7.5ms)

ActionView::Template::Error (undefined method `name' for nil:NilClass):
    32:                 
    33:         %>
    34:         <tr>
    35:                 <td><%= task[0].name %></td>
    36:                 <td><%= assigned_to[1] %></td>
    37:                 <td><%= assigned_to[2].name unless assigned_to[3]>2 %></td>
    38:                 <td><%= I18n.t('user_imp_status_' + assigned_to[3].to_s)%></td>
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'
braini75 commented 9 years ago

I’ve just tested the plugin against redmine 3.1. It is working without any problem. The attached error says that the mapping does not find the “name” of the mapped user. Make sure that assign users will have firstname and lastname attribute set.

braini75 commented 9 years ago

Easyredmine is able to Import MS Project XML files with ist own function:

=> =>
mrhatch commented 9 years ago

Thomas,

Thanks for your response, I had been using ProjectLibre to generate my xml files, and after finding another tool to generate the xml file I was able to get it to import. The problem appears to be with the XML. Thanks for looking into this.

Mike

Michael Hatch mrhatch@innocent.com 443-305-9363

On Tue, Oct 13, 2015 at 4:38 AM, Thomas K. notifications@github.com wrote:

Easyredmine is able to Import MS Project XML files with ist own function: => =>

— Reply to this email directly or view it on GitHub https://github.com/braini75/msproject_import/issues/4#issuecomment-147648260 .