Defect #19777

Ticket update/create fails with "% Done is not included in the list" even when this field not enabled

Added by Adrian Wilkins over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:-
Resolution:Duplicate Affected version:3.0.2

Description

% Done has never been enabled in the tracker in question

After upgrading to 3.0.2, all ticket updates and creates fail with the validation error

% Done is not included in the list

Enabling % Done fixes this, but then I have a field I don't need.


Related issues

Related to Redmine - Defect #19731: Issue validation fails if % done field is deactivated Closed

History

#1 Updated by Adrian Wilkins over 2 years ago

Problem is in r14214 (#19606)

Pre-validation step of clearing disabled fields clears the done_ratio field, but this field is declared NOT NULL in the database or is required to be present during some other validation step. Removing this line "fixes" the problem.

Proper fix is to allow done_ratio to be NULL. Not familiar enough with code to be sure how to do this.



  before_validation :clear_disabled_fields  # < THIS LINE ADDED IN COMMIT
  before_create :default_assign
  before_save :close_duplicates, :update_done_ratio_from_issue_status,
              :force_updated_on_change, :update_closed_on, :set_assigned_to_was
  after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?}
  after_save :reschedule_following_issues, :update_nested_set_attributes,
             :update_parent_attributes, :create_journal

#2 Updated by Go MAEDA over 2 years ago

  • Related to Defect #19731: Issue validation fails if % done field is deactivated added

#3 Updated by Jean-Philippe Lang over 2 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Same as #19731.

Also available in: Atom PDF