backlogs / redmine_backlogs

A Redmine plugin for agile teams
https://backlogs.github.io/www/
GNU General Public License v2.0
773 stars 460 forks source link

Backlog plug-in : Internal Error when we delete a user or task story #1053

Open rcufos opened 10 years ago

rcufos commented 10 years ago

Hi support,

We have created two trackers to manage Backlog plug-in : user_story and task_story. We have an PL who has enabled these two trackers on his project but forgot to enable the module backlog. He has created one issue of each type and now when we want to remove theses issues we faced an internal error. Please see below

Started DELETE "/redmine/issues/12728" for 127.0.0.1 at 2014-04-22 09:41:11 +0200 Processing by IssuesController#destroy as HTML
  Parameters: {"authenticity_token"=>"yxTBiracJsDk/YH550iR5iPJT8mRViokQ0OihJnljGo=", "id"=>"12728"}
  Current user: agut (id=3)
Completed 500 Internal Server Error in 669ms

NoMethodError (undefined method `created_on=' for nil:NilClass):
  app/models/issue.rb:1435:in `force_updated_on_change'
  app/models/issue.rb:159:in `create_or_update'
  app/models/issue.rb:1356:in `recalculate_attributes_for'
  app/models/issue.rb:1319:in `update_parent_attributes'
  app/models/issue.rb:173:in `destroy'
  app/controllers/issues_controller.rb:313:in `block in destroy'
  app/controllers/issues_controller.rb:311:in `each'
  app/controllers/issues_controller.rb:311:in `destroy'

In production.log, error for a user_task:

Started DELETE "/redmine/issues/12723" for 127.0.0.1 at 2014-04-22 09:49:36 +0200 Processing by IssuesController#destroy as HTML
  Parameters: {"authenticity_token"=>"yxTBiracJsDk/YH550iR5iPJT8mRViokQ0OihJnljGo=", "id"=>"12723"}
  Current user: agut (id=3)
Completed 500 Internal Server Error in 488ms

NoMethodError (undefined method `created_on=' for nil:NilClass):
  app/models/issue.rb:1435:in `force_updated_on_change'
  app/models/issue.rb:159:in `create_or_update'
  app/models/issue.rb:1356:in `recalculate_attributes_for'
  app/models/issue.rb:1319:in `update_parent_attributes'
  app/models/issue.rb:173:in `destroy'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:455:in `block (2 levels) in destroy_descendants'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:453:in `block in destroy_descendants'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:426:in `in_tenacious_transaction'
  lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb:443:in `destroy_descendants'
  app/models/issue.rb:173:in `destroy'
  app/controllers/issues_controller.rb:313:in `block in destroy'
  app/controllers/issues_controller.rb:311:in `each'
  app/controllers/issues_controller.rb:311:in `destroy'

Thanks for your help. Best regards Beckie