Project

General

Profile

Actions

Defect #11593

closed

Error 500 on child issue with no start date

Added by Cassiano Monteiro over 12 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

I had one parent issue with 4 subtasks, all of them with start and due dates. After that, I tried to create one more subtask, but with no start date, and I got the error 500. After filling start date, it worked.

Here is the log:

Processing IssuesController#create (for 10.3.14.201 at 2012-08-06 10:53:14) [POST]
  Parameters: {"commit"=>"Create", "project_id"=>"servicos", "action"=>"create", "authenticity_token"=>"FMte7OHKMqFib4UOSGwRvGi3Pi4kkmwunMtCX1R9QO4=", "issue"=>{"start_date"=>"", "custom_field_values"=>{"45"=>"", "46"=>"", "14"=>"", "9"=>"Routine", "42"=>""}, "estimated_hours"=>"5", "parent_issue_id"=>"5055", "priority_id"=>"4", "fixed_version_id"=>"", "done_ratio"=>"0", "assigned_to_id"=>"26", "subject"=>"Conferir Balance Chart da Belavia", "tracker_id"=>"4", "due_date"=>"2012-09-06", "status_id"=>"1", "description"=>""}, "controller"=>"issues", "new_checklist"=>"", "attachments"=>{"1"=>{"description"=>""}}}
Sending email notification to: tatiane.ramos@embraer.com.br

TypeError (expected numeric or date):
  C:/webserver/Ruby/lib/ruby/1.8/date.rb:1252:in `minus_without_duration'
  C:1:in `each'
  C:1:in `__send__'
  C:1:in `each'
  app/models/issue.rb:946:in `recalculate_attributes_for'
  app/models/issue.rb:910:in `update_parent_attributes'
  app/controllers/issues_controller.rb:148:in `create'
  config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering C:/webserver/Redmine/public/500.html (500 Internal Server Error)
Actions #1

Updated by Jean-Philippe Lang over 12 years ago

  • Resolution set to Cant reproduce
Actions #2

Updated by 测试 测试 over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Maxim Krušina
Actions #3

Updated by Toshi MARUYAMA over 12 years ago

  • Status changed from Resolved to New
Actions #4

Updated by Anonymous about 12 years ago

Confirmed here in 1.3.3 and 1.4.3.

Symptom is parent issue that has several sub-issues. If one of the sub-issues has an empty start date then you cannot update its attributes (status, comments, anything) until you enter a start date into that child issue. Otherwise the following backtrace is generated.

Previously avoided this by having default start dates, but we disabled that recently because it was misleading.

TypeError (expected numeric or date):
  /usr/lib/ruby/1.8/date.rb:1252:in `minus_without_duration'
  /usr/lib/ruby/vendor_ruby/active_support/core_ext/date/calculations.rb:88:in `-'
  /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:114:in `each'
  /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:114:in `__send__'
  /usr/lib/ruby/vendor_ruby/active_record/named_scope.rb:114:in `each'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `evaluate_method'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:166:in `call'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:93:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `each'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:276:in `run_callbacks'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:344:in `callback_without_switch'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:251:in `create_or_update'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:2577:in `save_without_validation'
  /usr/lib/ruby/vendor_ruby/active_record/validations.rb:1089:in `save_without_dirty'
  /usr/lib/ruby/vendor_ruby/active_record/dirty.rb:79:in `save_without_transactions'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:229:in `send'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:229:in `with_transaction_returning_status'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:182:in `transaction'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:228:in `with_transaction_returning_status'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:196:in `save'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:208:in `rollback_active_record_state!'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:196:in `save'
  app/models/issue.rb:831:in `recalculate_attributes_for'
  app/models/issue.rb:795:in `update_parent_attributes'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:178:in `evaluate_method'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:166:in `call'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:93:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `each'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `send'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:92:in `run'
  /usr/lib/ruby/vendor_ruby/active_support/callbacks.rb:276:in `run_callbacks'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:344:in `callback_without_switch'
  /usr/lib/ruby/vendor_ruby/active_record/callbacks.rb:251:in `create_or_update'
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:2577:in `save_without_validation'
  /usr/lib/ruby/vendor_ruby/active_record/validations.rb:1089:in `save_without_dirty'
  /usr/lib/ruby/vendor_ruby/active_record/dirty.rb:79:in `save_without_transactions'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:229:in `send'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:229:in `with_transaction_returning_status'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:182:in `transaction'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:228:in `with_transaction_returning_status'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:196:in `save'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:208:in `rollback_active_record_state!'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:196:in `save'
  app/models/issue.rb:629:in `save_issue_with_child_records'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
  /usr/lib/ruby/vendor_ruby/active_record/transactions.rb:182:in `transaction'
  app/models/issue.rb:613:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:180:in `update'
 /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:21:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:479:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:180:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:82: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:213:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  /usr/share/phusion-passenger/helper-scripts/passenger-spawn-server:99

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)
Actions #5

Updated by Toshi MARUYAMA about 12 years ago

  • Assignee deleted (Maxim Krušina)
Actions #6

Updated by Etienne Massip almost 12 years ago

Still can't reproduce with Ruby 1.9, guess it's 1.8 related, has one of you tried again after upgrading to 1.9?

Actions #7

Updated by Marius BĂLTEANU almost 6 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF