Defect #6632

Incomplete migration from Trac to Redmine

Added by Alexander Sapozhnikov about 9 years ago. Updated over 5 years ago.

Status:NewStart date:2010-10-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:-
Resolution: Affected version:1.0.2

Description

When projects migrated from Trac 0.11.7 to Redmine 1.0.2 several fields (lft, rgt and root_id) in table isssues leaves blank (NULL).

After migration Redmine produce Internal Server Error when attempt to see imported issues:

ActionView::TemplateError (comparison of Fixnum with nil failed) on line #16 of app/views/issues/_list.rhtml:
13:     </tr></thead>
14:     <% previous_group = false %>
15:     <tbody>
16:     <% issue_list(issues) do |issue, level| -%>
17:   <% if @query.grouped? && (group = @query.group_by_column.value(issue)) != previous_group %>
18:     <% reset_cycle %>
19:     <tr class="group open">

When editing tasks where root_id IS NULL, Redmine hangs and eats many memory and CPU time.

I solve this bug by executing 3 SQL queries:

UPDATE issues SET lft=1 WHERE lft IS NULL;
UPDATE issues SET rgt=2 WHERE rgt IS NULL;
UPDATE issues SET root_id=id WHERE root_id IS NULL;

See also: http://www.redmine.org/boards/2/topics/18087

History

#1 Updated by Toshi MARUYAMA over 5 years ago

  • Category changed from Database to Importers

Also available in: Atom PDF