Project

General

Profile

Actions

Defect #23878

closed

Closing all subtasks causes error if default priority is not defined and priority is derived from subtasks

Added by Pavel Potcheptsov about 8 years ago. Updated about 8 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Others tasks are closing normally but this one throws an error.

Redmine 3.3.0.stable.15842
Environment:
  Redmine version                3.3.0.stable.15842
  Ruby version                   1.9.3-p327 (2012-11-10) [i686-linux]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.8
  Git                            1.7.1
  Filesystem                     
Redmine plugins:
  advanced_roadmap_v2            2.4.3
  redmine_agile                  1.4.1
  redmine_checklists             3.1.5
  redmine_lightbox2              0.3.1
  redmine_timesheet_plugin       0.7.0
  redmine_xls_export             0.2.1.t9

Started PATCH "/issues/22964/edit.js" for 127.0.0.1 at 2016-09-21 09:14:15 +0200
Processing by IssuesController#edit as JS
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"**********", "form_update_triggered_by"=>"issue_status_id", "issue"=>{"is_private"=>"0", "project_id"=>"657", "tracker_id"=>"4", "subject"=>"************", "description"=>"", "status_id"=>"5", "priority_id"=>"4", "assigned_to_id"=>"213", "fixed_version_id"=>"956", "parent_issue_id"=>"22746", "start_date"=>"2016-09-02", "due_date"=>"2016-09-02", "estimated_hours"=>"8.0", "done_ratio"=>"100", "checklists_attributes"=>{"0"=>{"is_done"=>"0", "subject"=>"", "_destroy"=>"false", "position"=>"1", "id"=>""}}, "notes"=>"", "private_notes"=>"0", "lock_version"=>"11"}, "time_entry"=>{"hours"=>"", "activity_id"=>"20", "user_id"=>"95", "comments"=>""}, "last_journal_id"=>"152098", "id"=>"22964"}
  Current user: ppo (id=95)
  Rendered issues/_form_custom_fields.html.erb (0.1ms)
  Rendered issues/_attributes.html.erb (17.9ms)
  Rendered plugins/redmine_agile/app/views/issues/_issue_story_points_form.html.erb (0.1ms)
  Rendered plugins/redmine_agile/app/views/issues/_agile_data_fields.html.erb (0.3ms)
  Rendered plugins/redmine_checklists/app/views/issues/_checklist_fields.html.erb (1.1ms)
  Rendered plugins/redmine_checklists/app/views/issues/_checklist_fields.html.erb (0.9ms)
  Rendered plugins/redmine_checklists/app/views/issues/_checklist_form.html.erb (4.4ms)
  Rendered issues/_form.html.erb (65.1ms)
  Rendered issues/edit.js.erb (67.5ms)
Completed 200 OK in 120ms (Views: 66.1ms | ActiveRecord: 11.1ms)
Started GET "/time_loggers/render_menu?_=1474385709357" for 127.0.0.1 at 2016-09-21 09:14:18 +0200

Started PATCH "/issues/22964" for 127.0.0.1 at 2016-09-21 09:14:19 +0200
Processing by IssuesController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"******", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "project_id"=>"657", "tracker_id"=>"4", "subject"=>"********", "description"=>"", "status_id"=>"5", "priority_id"=>"4", "assigned_to_id"=>"213", "fixed_version_id"=>"956", "parent_issue_id"=>"22746", "start_date"=>"2016-09-02", "due_date"=>"2016-09-02", "estimated_hours"=>"8.0", "done_ratio"=>"100", "notes"=>"", "private_notes"=>"0", "lock_version"=>"11"}, "time_entry"=>{"hours"=>"", "activity_id"=>"20", "user_id"=>"95", "comments"=>""}, "last_journal_id"=>"152098", "commit"=>"Submit", "id"=>"22964"}
  Current user: ppo (id=95)
Completed 500 Internal Server Error in 227ms (ActiveRecord: 149.4ms)

ActiveRecord::StatementInvalid (Mysql2::Error: Column 'priority_id' cannot be null: UPDATE `issues` SET `issues`.`priority_id` = NULL, `issues`.`updated_on` = '2016-09-21 09:14:19', `issues`.`lock_version` = 36 WHERE `issues`.`id` = 22746 AND `issues`.`lock_version` = 35):
  app/models/issue.rb:210:in `create_or_update'
  app/models/issue.rb:1567:in `recalculate_attributes_for'
  app/models/issue.rb:1523:in `update_parent_attributes'
  app/models/issue.rb:210:in `create_or_update'
  app/controllers/issues_controller.rb:515:in `block in save_issue_with_child_records'
  app/controllers/issues_controller.rb:503:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:179:in `update'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'


Files

redmine_close_task.png (84.7 KB) redmine_close_task.png Pavel Potcheptsov, 2016-09-21 09:27
Actions

Also available in: Atom PDF