Defect #19777
closed
Ticket update/create fails with "% Done is not included in the list" even when this field not enabled
Added by Adrian Wilkins over 9 years ago.
Updated over 9 years ago.
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.
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
- Related to Defect #19731: Issue validation fails if % done field is deactivated added
- Status changed from New to Closed
- Resolution set to Duplicate
Also available in: Atom
PDF