Defect #8471
closedcreating subtask fails
0%
Description
I just upgraded rm 1.1.3 to latest stable release 1.2.0. I tested opening new tickets which worked as usual. But creating subtasks end with internal failure, neither the main task nor subtask are accessible. Though in gantt chart both of them are visible.
About your application's environment Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.3.5 Rack version 1.1 Rails version 2.3.11 Active Record version 2.3.11 Active Resource version 2.3.11 Action Mailer version 2.3.11 Active Support version 2.3.11 Edge Rails revision unknown Application root /usr/share/redmine-1.2.0 Environment production Database adapter mysql Database schema version 20110511000000 About your Redmine plugins Redmine Better Gantt Chart plugin 0.5.1 Knowledgebase 0.2.5
this is, what my apache error log gives me:
ActionView::TemplateError (Mysql::Error: Column 'lft' in order clause is ambiguous: 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 != 131)) AND ((issues.`lft` >= 1 AND issues.`rgt` <= 4) AND (`issues`.`root_id` = 131))) ORDER BY `lft`) on line #72 of app/views/issues/show.rhtml: 69: <%= link_to(l(:button_add), {:controller => 'issues', :action => 'new', :project_id => @project, :issue => {:parent_issue_id => @issue}}) if User.current.allowed_to?(:manage_subtasks, @project) %> 70: </div> 71: <p><strong><%=l(:label_subtask_plural)%></strong></p> 72: <%= render_descendants_tree(@issue) unless @issue.leaf? %> 73: </div> 74: <% end %> 75: app/helpers/issues_helper.rb:80:in `render_descendants_tree' app/views/issues/show.rhtml:72:in `_run_rhtml_app47views47issues47show46rhtml' app/controllers/issues_controller.rb:121 app/controllers/issues_controller.rb:120:in `show' /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:95:in `process_request' /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start' /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:209:in `start' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application' /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop' /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously' /usr/lib/phusion_passenger/passenger-spawn-server:61
Updated by Matthias Herzog almost 14 years ago
I followed http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade to upgrade rack & rails. DB migration ran without errors and everything worked besides gantt charts (I installed better gantt chart plugin). So I updated better gantt chart plugin, and everything was fine again besides this subtask issue.
Updated by Etienne Massip almost 14 years ago
And what if you don't use Gantt Chart plugin ?
If this is a plugin issue, you should contact its author and let me know so I can close this issue.
Updated by Matthias Herzog almost 14 years ago
Ok, I removed the plugin using
rake db:migrate:plugin NAME=redmine_better_gantt_chart VERSION=0 RAILS_ENV=production
and moving the redmine_better_gantt_chart from the plugins directory. It's not displayed anymore in configuration screen, but tickets with subtasks still do not open.
Updated by Matthias Herzog almost 14 years ago
I don't think it's a plugin issue, as I can reproduce this error every time I create a subtask.
Updated by Matthias Herzog almost 14 years ago
- Status changed from New to Resolved
ok, reinstalled redmine, problem solved. may be closed.
Updated by Etienne Massip almost 14 years ago
- Status changed from Resolved to Closed
- Resolution set to Invalid
Updated by Sergey Popov almost 14 years ago
- Status changed from Closed to Reopened
I have this problem too. How I can sove this problem without reinstallation?
Updated by Nicolas Cybulski almost 14 years ago
I have the same problem too
ActionView::TemplateError (Mysql::Error: Column 'lft' in order clause is ambiguous: 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`.`position` AS t0_r22, `issues`.`story_points` AS t0_r23, `issues`.`remaining_hours` AS t0_r24, `issues`.`is_private` AS t0_r25, `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, `projects`.`customer_id` AS t1_r12, `projects`.`dmsf_description` AS t1_r13 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 != 1786)) AND ((issues.`lft` <= 4 AND issues.`rgt` >= 5) AND (`issues`.`root_id` = 1783))) ORDER BY `lft`) on line #9 of app/views/issues/show.rhtml:
The problem is indeed the 'lft' field. But I know too little of ruby to change it in the /rb files
Updated by Nicolas Cybulski almost 14 years ago
Small hack
in file app\helpers\issues_helper.rb
on line 64
change
ancestors = issue.root? ? [] : issue.ancestors.visible.all
with
- ancestors = issue.root? ? [] : issue.ancestors.visible.all
ancestors = issue.root? ? [] : []
restart redmine
that way at least it will show the name of the issue and you'll be able to work ... it doesn't fix the complete 'path' of the issues (with ancestor issues).
I guess it has sth to do with issue.ancestors in issue.rb but not really sure.
Updated by Nicolas Cybulski almost 14 years ago
Small hack
in file app\helpers\issues_helper.rb
on line 64
change
ancestors = issue.root? ? [] : issue.ancestors.visible.all
with
#ancestors = issue.root? ? [] : issue.ancestors.visible.all ancestors = issue.root? ? [] : [] restart redmine
that way at least it will show the name of the issue and you'll be able to work ... it doesn't fix the complete 'path' of the issues (with ancestor issues).
I guess it has sth to do with issue.ancestors in issue.rb but not really sure.
Updated by Nicolas Cybulski almost 14 years ago
Small hack
in file app\helpers\issues_helper.rb
on line 64
change
ancestors = issue.root? ? [] : issue.ancestors.visible.all
with
ancestors = issue.root? ? [] : issue.ancestors.visible.all ancestors = issue.root? ? [] : []
restart redmine
that way at least it will show the name of the issue and you'll be able to work ... it doesn't fix the complete 'path' of the issues (with ancestor issues).
I guess it has sth to do with issue.ancestors in issue.rb but not really sure.
(sorry for the triple post
Updated by Nicolas Cybulski almost 14 years ago
Sorry ... http://www.redmine.org/issues/8508 fixed my problem as well (no reinstallation needed)
Updated by Etienne Massip over 13 years ago
- Status changed from Reopened to Closed