Project

General

Profile

Actions

Defect #11591

open

Error 500 on showing copied issue

Added by Cassiano Monteiro over 11 years ago. Updated over 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

After copying one issue, I received an error 500. After that, I can´t access that issue anymore, neither any page that is supposed to show it (like, roadmap, issues list, etc.).

I noticed that the original issue had 3 child issues, but looking back at the table ISSUES on the database, the fields ROOT_ID, LFT and RGT had NULL values. After copying the values from the original issue, it worked again.

From some reason, seems that the copying procedure produced some inconsistent data.

Here are my logs:

Copying the original issue

Processing IssuesController#show (for 10.3.14.64 at 2012-08-06 10:16:43) [GET]
  Parameters: {"action"=>"show", "id"=>"4535", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show
Completed in 1094ms (View: 938, DB: 109) | 200 OK [http://pc319918.corp.ad.emb/issues/4535]

Processing IssuesController#new (for 10.3.14.64 at 2012-08-06 10:17:01) [GET]
  Parameters: {"project_id"=>"cursos", "action"=>"new", "copy_from"=>"4535", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/new
Completed in 266ms (View: 188, DB: 31) | 200 OK [http://pc319918.corp.ad.emb/projects/cursos/issues/4535/copy]

Saving the new copied issue:

Processing IssuesController#create (for 10.3.14.64 at 2012-08-06 10:18:01) [POST]
  Parameters: {"commit"=>"Create", "project_id"=>"cursos", "action"=>"create", "authenticity_token"=>"uhYFRtRtyVeEpWNUA+PKrF24WJzzT1qlZJMYVkyrKd8=", "copy_from"=>"4535", "issue"=>{"start_date"=>"2012-08-06", "custom_field_values"=>{"14"=>"", "9"=>"Routine", "42"=>""}, "estimated_hours"=>"7.0", "parent_issue_id"=>"", "priority_id"=>"4", "project_id"=>"33", "fixed_version_id"=>"200", "done_ratio"=>"0", "assigned_to_id"=>"14", "subject"=>"Logística", "tracker_id"=>"4", "due_date"=>"2012-08-17", "status_id"=>"5", "description"=>""}, "controller"=>"issues", "new_checklist"=>"", "attachments"=>{"1"=>{"description"=>""}}}
Redirected to http://pc319918.corp.ad.emb/redmine/issues/5038
Completed in 141ms (DB: 31) | 302 Found [http://pc319918.corp.ad.emb/projects/cursos/issues]

Processing IssuesController#show (for 10.3.14.64 at 2012-08-06 10:18:01) [GET]
  Parameters: {"action"=>"show", "id"=>"5038", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show

ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #5 of app/views/issues/show.html.erb:
2: 
3: <h2><%= issue_heading(@issue) %></h2>
4: 
5: <div class="<%= @issue.css_classes %> details">
6:   <% if @prev_issue_id || @next_issue_id %>
7:     <div class="next-prev-links contextual">
8:       <%= link_to_if @prev_issue_id,

    app/models/issue.rb:710:in `css_classes'
    app/views/issues/show.html.erb:5
    app/controllers/issues_controller.rb:118:in `show'
    app/controllers/issues_controller.rb:115:in `show'
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

Trying to see the issue by typing its number on the search box:

Processing IssuesController#index (for 10.3.14.33 at 2012-08-06 10:55:37) [GET]
  Parameters: {"v"=>{"created_on"=>["2012-08-03", "2012-08-07"]}, "op"=>{"created_on"=>"t><", "status_id"=>"c"}, "group_by"=>"", "project_id"=>"cursos", "set_filter"=>"1", "c"=>["tracker", "status", "subject", "author", "assigned_to", "due_date"], "action"=>"index", "f"=>["status_id", "created_on", ""], "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/index

ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #28 of app/views/issues/_list.html.erb:
25:     </tr>
26:     <% previous_group = group %>
27:   <% end %>
28:   <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
29:     <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
30:     <td class="id"><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
31:         <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.css_classes %><% end %>

    app/models/issue.rb:710:in `css_classes'
    app/views/issues/_list.html.erb:28
    app/helpers/issues_helper.rb:29:in `issue_list'
    app/helpers/issues_helper.rb:25:in `each'
    app/helpers/issues_helper.rb:25:in `issue_list'
    app/views/issues/_list.html.erb:16
    app/views/issues/_list.html.erb:1
    app/views/issues/index.html.erb:59
    app/controllers/issues_controller.rb:83:in `index'
    app/controllers/issues_controller.rb:82:in `index'
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

Trying to get an issues list with the problematic issue on it:

Processing IssuesController#show (for 10.3.14.33 at 2012-08-06 10:40:54) [GET]
  Parameters: {"action"=>"show", "id"=>"5038", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/show

ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #6 of app/views/issues/_action_menu.html.erb:
3: <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'new', :issue_id => @issue}, :class => 'icon icon-time-add' %>
4: <%= watcher_tag(@issue, User.current) %>
5: <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue}, :class => 'icon icon-copy' %>
6: <%= link_to l(:button_delete), issue_path(@issue), :confirm => issues_destroy_confirmation_message(@issue), :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
7: </div>

    app/helpers/issues_helper.rb:117:in `issues_destroy_confirmation_message'
    app/helpers/issues_helper.rb:117:in `each'
    app/helpers/issues_helper.rb:117:in `inject'
    app/helpers/issues_helper.rb:117:in `issues_destroy_confirmation_message'
    app/views/issues/_action_menu.html.erb:6
    app/views/issues/show.html.erb:1
    app/controllers/issues_controller.rb:118:in `show'
    app/controllers/issues_controller.rb:115:in `show'
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

Trying to see the roadmap:

Processing VersionsController#index (for 10.3.14.33 at 2012-08-06 10:25:11) [GET]
  Parameters: {"project_id"=>"cursos", "action"=>"index", "controller"=>"versions"}
Rendering template within layouts/base
Rendering versions/index

ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #23 of app/views/versions/index.html.erb:
20:     <% issues.each do |issue| -%>
21:       <tr class="hascontextmenu">
22:         <td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
23:         <td><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
24:       </tr>
25:     <% end -%>
26:     </table>

    app/models/issue.rb:710:in `css_classes'
    app/helpers/application_helper.rb:86:in `link_to_issue'
    app/views/versions/index.html.erb:23
    app/views/versions/index.html.erb:20:in `each'
    app/views/versions/index.html.erb:20
    app/views/versions/index.html.erb:17
    app/views/versions/index.html.erb:11:in `each'
    app/views/versions/index.html.erb:11
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)

Actions

Also available in: Atom PDF