Defect #8508
closedProjet with Subtask won't open after migration from 1.1.3 to 1.2.0
0%
Description
After migrating to version Redmine 1.2.0 all my project with subtask can not open see error below
If you create an issues ans then add un subtask same problem
the problem is order by clause is missing the identifyng table
as follow
Select ..... ORDER BY "lft"
should be depending of what is the scope of the lists to show
Select ...... ORDER BY "issues"."lft" or
Select ...... ORDER BY "projetcs"."lft" or
Select ...... ORDER BY "projetcs"."lft", "issues"."lft"
Rendered issues/_action_menu (4.3ms)
[[4;35;1mIssue Load Including Associations (0.0ms)[[0m [[0mSQLite3::SQLException: ambiguous column name: lft: SELECT "issues"."id" AS t0_r0, "issues"."tracker_id" AS t0_r1, "issues"."project_id" AS t0_r2, "issues"."subject" AS t0_r3, "issues"."description" AS t0_r4, "issues"."due_date" AS t0_r5, "issues"."category_id" AS t0_r6, "issues"."status_id" AS t0_r7, "issues"."assigned_to_id" AS t0_r8, "issues"."priority_id" AS t0_r9, "issues"."fixed_version_id" AS t0_r10, "issues"."author_id" AS t0_r11, "issues"."lock_version" AS t0_r12, "issues"."created_on" AS t0_r13, "issues"."updated_on" AS t0_r14, "issues"."start_date" AS t0_r15, "issues"."done_ratio" AS t0_r16, "issues"."estimated_hours" AS t0_r17, "issues"."parent_id" AS t0_r18, "issues"."root_id" AS t0_r19, "issues"."lft" AS t0_r20, "issues"."rgt" AS t0_r21, "issues"."is_private" AS t0_r22, "projects"."id" AS t1_r0, "projects"."name" AS t1_r1, "projects"."description" AS t1_r2, "projects"."homepage" AS t1_r3, "projects"."is_public" AS t1_r4, "projects"."parent_id" AS t1_r5, "projects"."created_on" AS t1_r6, "projects"."updated_on" AS t1_r7, "projects"."identifier" AS t1_r8, "projects"."status" AS t1_r9, "projects"."lft" AS t1_r10, "projects"."rgt" AS t1_r11 FROM "issues" LEFT OUTER JOIN "projects" ON "projects".id = "issues".project_id WHERE (((projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.id != 26)) AND ((issues."lft" <= 2 AND issues."rgt" >= 3) AND ("issues"."root_id" = 21))) ORDER BY "lft"[[0m
ActionView::TemplateError (SQLite3::SQLException: ambiguous column name: lft: SELECT "issues"."id" AS t0_r0, "issues"."tracker_id" AS t0_r1, "issues"."project_id" AS t0_r2, "issues"."subject" AS t0_r3, "issues"."description" AS t0_r4, "issues"."due_date" AS t0_r5, "issues"."category_id" AS t0_r6, "issues"."status_id" AS t0_r7, "issues"."assigned_to_id" AS t0_r8, "issues"."priority_id" AS t0_r9, "issues"."fixed_version_id" AS t0_r10, "issues"."author_id" AS t0_r11, "issues"."lock_version" AS t0_r12, "issues"."created_on" AS t0_r13, "issues"."updated_on" AS t0_r14, "issues"."start_date" AS t0_r15, "issues"."done_ratio" AS t0_r16, "issues"."estimated_hours" AS t0_r17, "issues"."parent_id" AS t0_r18, "issues"."root_id" AS t0_r19, "issues"."lft" AS t0_r20, "issues"."rgt" AS t0_r21, "issues"."is_private" AS t0_r22, "projects"."id" AS t1_r0, "projects"."name" AS t1_r1, "projects"."description" AS t1_r2, "projects"."homepage" AS t1_r3, "projects"."is_public" AS t1_r4, "projects"."parent_id" AS t1_r5, "projects"."created_on" AS t1_r6, "projects"."updated_on" AS t1_r7, "projects"."identifier" AS t1_r8, "projects"."status" AS t1_r9, "projects"."lft" AS t1_r10, "projects"."rgt" AS t1_r11 FROM "issues" LEFT OUTER JOIN "projects" ON "projects".id = "issues".project_id WHERE (((projects.status=1 AND projects.id IN (SELECT em.project_id FROM enabled_modules em WHERE em.name='issue_tracking')) AND (issues.id != 26)) AND ((issues."lft" <= 2 AND issues."rgt" >= 3) AND ("issues"."root_id" = 21))) ORDER BY "lft") on line #9 of app/views/issues/show.rhtml:
6: <%= avatar(@issue.author, :size => "50") >^M
7: ^M
8: <div class="subject"> ^M
9: <= render_issue_subject_with_tree(@issue) >^M
10: </div>^M
11: <p class="author">^M
12: <= authoring @issue.created_on, @issue.author %>.^M
app/helpers/issues_helper.rb:64:in `render_issue_subject_with_tree'
app/views/issues/show.rhtml:9:in `_run_rhtml_app47views47issues47show46rhtml'
app/controllers/issues_controller.rb:121:in `show'
app/controllers/issues_controller.rb:120:in `show'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:162:in `start'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:95:in `start'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:92:in `each'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:92:in `start'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:23:in `start'
/home/users/limdev/tools/ruby1.8.7/lib/ruby/1.8/webrick/server.rb:82:in `start'
Rendering /home/users/limdev/tools/redmine-1.2.0/public/500.html (500 Internal Server Error)