Actions
Defect #7385
closedError when viewing an issue which was related to a deleted subtask
Start date:
2011-01-20
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
I get this bug against the current Redmine version 1.1.0.stable.4732
This bug is reproducible with the following steps:
- Create an issue A
- Create issue B and make it a subtask of A
- Create issue C and add B as a related issue
- Delete A (Redmine normally also deletes subtasks)
- Now try to view issue C and you get Redmine internal error.
Expected:
You should be able to view the issue with no problems
Actual Result:
You get an internal Error 500
- Issue C is still accessible through the Edit action.
- Deleting an issue with a simple issue relation doesn't trigger this.
Error Log:
Processing IssuesController#show (for 10.121.44.164 at 2011-01-19 23:21:51) [GET] Parameters: {"action"=>"show", "id"=>"88", "controller"=>"issues"} Rendering template within layouts/base Rendering issues/show.rhtml ActionView::TemplateError (undefined method `visible?' for nil:NilClass) on line #11 of app/views/issues/_relations.rhtml: 8: 9: <% if @issue.relations.any? %> 10: <table style="width:100%"> 11: <% @issue.relations.select {|r| r.other_issue(@issue).visible? }.each do |relation| %> 12: <tr> 13: <td><%= l(relation.label_for(@issue)) %> <%= "(#{l('datetime.distance_in_words.x_days', :count => relation.delay)})" if relation.delay && relation.delay != 0 %> 14: <%= h(relation.other_issue(@issue).project) + ' - ' if Setting.cross_project_issue_relations? %> app/views/issues/_relations.rhtml:11:in `_run_rhtml_app47views47issues47_relations46rhtml_locals_object_relations' app/views/issues/_relations.rhtml:11:in `select' app/views/issues/_relations.rhtml:11:in `_run_rhtml_app47views47issues47_relations46rhtml_locals_object_relations' app/views/issues/show.rhtml:79:in `_run_rhtml_app47views47issues47show46rhtml' app/controllers/issues_controller.rb:116:in `show' app/controllers/issues_controller.rb:115:in `show' /root/passenger-2.2.15/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request' /root/passenger-2.2.15/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop' /root/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler' /root/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application' /root/passenger-2.2.15/lib/phusion_passenger/utils.rb:252:in `safe_fork' /root/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `__send__' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `main_loop' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:163:in `start' /root/passenger-2.2.15/lib/phusion_passenger/railz/application_spawner.rb:222:in `start' /root/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add' /root/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize' /root/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application' /root/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application' /root/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `__send__' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `main_loop' /root/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
Related issues
Actions