Defect #8389
closedNil values cause errors in issues update/delete
0%
Description
We have some problem handling issues (tasks) in this env:
Redmine 1.1.3 with relate ruby and gem
Db = MySql
pluglin =
Our application is addressed as "http://10.17... /redmine"
Handling elements of a hierarchy (e.g.: delete a subtask, change due date in a sub task, ,...) get an error indication.
Generally, it seems that there are problems handling Nil values in some methods.
Trace follows:
Processing IssuesController#destroy (for 10.17.XX.XX at 2011-05-18 09:24:25) [POST]
Parameters: {"action"=>"destroy", "authenticity_token"=>"xs4SABVn+tueEqdpLnwq6C/HTz+jJvt3hub3IptEGdM=", "id"=>"76", "controller"=>"issues"}
ArgumentError (comparison of Date with nil failed):
app/models/issue.rb:763:in `recalculate_attributes_for'
app/models/issue.rb:727:in `update_parent_attributes'
app/controllers/issues_controller.rb:241:in `destroy'
app/controllers/issues_controller.rb:239:in `each'
app/controllers/issues_controller.rb:239:in `destroy'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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
Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
===============
Processing IssuesController#create (for 10.17.39.157 at 2011-05-18 09:26:37) [POST]
Parameters: {"commit"=>"Create", "project_id"=>"piertest", "action"=>"create", "authenticity_token"=>"/ME4Q+sDBEaWSsYwqY0vPaslLtWg9VGevmy1ra84xlA=", "issue"=>{"start_date"=>"2011-05-18", "estimated_hours"=>"", "priority_id"=>"4", "parent_issue_id"=>"135", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"due.uno", "tracker_id"=>"5", "due_date"=>"", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}
Sending email notification to:
NoMethodError (undefined method `<=>' for nil:NilClass):
app/models/issue.rb:763:in `recalculate_attributes_for'
app/models/issue.rb:727:in `update_parent_attributes'
app/controllers/issues_controller.rb:135:in `create'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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
Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
==================
Processing IssuesController#update (for 10.17.39.157 at 2011-05-18 09:20:52) [PUT]
Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "notes"=>"", "action"=>"update", "_method"=>"put", "authenticity_token"=>"/ME4Q+sDBEaWSsYwqY0vPaslLtWg9VGevmy1ra84xlA=", "id"=>"130", "issue"=>{"start_date"=>"2011-05-18", "estimated_hours"=>"", "priority_id"=>"4", "parent_issue_id"=>"128", "lock_version"=>"1", "done_ratio"=>"0", "assigned_to_id"=>"5", "subject"=>"uno.due", "tracker_id"=>"5", "due_date"=>"2011-05-23", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}
NoMethodError (undefined method `<=>' for nil:NilClass):
app/models/issue.rb:563:in `save_issue_with_child_records'
app/models/issue.rb:545:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:170:in `update'
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92: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:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358: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:354: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:213: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
Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
=======================
Is there some patch we could install or remove ?
Thank you