Project

General

Profile

Actions

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 almost 9 years ago. Updated almost 9 years ago.

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

0%

Estimated time:
Resolution:
Duplicate
Affected version:

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 deactivatedClosedJean-Philippe Lang

Actions
Actions #1

Updated by Adrian Wilkins almost 9 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

Actions #2

Updated by Go MAEDA almost 9 years ago

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

Updated by Jean-Philippe Lang almost 9 years ago

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

Same as #19731.

Actions

Also available in: Atom PDF