Feature #38416
closed
Ability to disable the priority field
Added by Go MAEDA over 1 year ago.
Updated over 1 year ago.
Description
Redmine can disable core fields such as subject, description, and assignee per tracker (#1091). However, the priority field cannot be disabled currently. The attached patch adds the ability to the priority field as well.
I have been asked many times how to disable the priority field. Since Redmine's flexible issue tracking features can be used for a wide range of purposes, there are use cases that don't need the priority field. The ability to disable the priority field will make Redmine easier to use in such use cases.
After applying the patch, You will be able to disable priority as well as other fields in the tracker's edit page. When the priority field is disabled, the default status is set for the newly created issue.
Files
- Target version set to Candidate for next major release
- Target version changed from Candidate for next major release to 5.1.0
Setting the target version to 5.1.0.
- Related to Feature #12745: Disable the default "Description/Status/Priority" field added
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch in r22185.
- Status changed from Closed to Reopened
'priority_id'
must not be added to the beginning of CORE_FIELDS
, because the array subscripts correspond to the bits in Tracker#fields_bits.
diff --git a/app/models/tracker.rb b/app/models/tracker.rb
index ce476092d..bfec75e70 100644
--- a/app/models/tracker.rb
+++ b/app/models/tracker.rb
@@ -24,8 +24,8 @@ class Tracker < ActiveRecord::Base
# Fields that can be disabled
# Other (future) fields should be appended, not inserted!
CORE_FIELDS =
- %w(priority_id assigned_to_id category_id fixed_version_id parent_issue_id
- start_date due_date estimated_hours done_ratio description).freeze
+ %w(assigned_to_id category_id fixed_version_id parent_issue_id
+ start_date due_date estimated_hours done_ratio description priority_id).freeze
CORE_FIELDS_ALL = (CORE_FIELDS_UNDISABLABLE + CORE_FIELDS).freeze
before_destroy :check_integrity
Go MAEDA wrote in #note-6:
'priority_id'
must not be added to the beginning of CORE_FIELDS
, because the array subscripts correspond to the bits in Tracker#fields_bits.
Fixed in r22186.
- Status changed from Reopened to Closed
- Related to Feature #35796: Allow subject and priority issue attributes (i.e. tracker fields) to be disablable added
- Related to Defect #40860: Creating a new issue fails with an internal error if no issue priorities are defined added
Also available in: Atom
PDF