Project

General

Profile

Actions

Feature #38416

closed

Ability to disable the priority field

Added by Go MAEDA over 1 year ago. Updated over 1 year ago.

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

0%

Estimated time:
Resolution:
Fixed

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


Related issues

Related to Redmine - Feature #12745: Disable the default "Description/Status/Priority" fieldClosed

Actions
Related to Redmine - Feature #35796: Allow subject and priority issue attributes (i.e. tracker fields) to be disablableNew

Actions
Related to Redmine - Defect #40860: Creating a new issue fails with an internal error if no issue priorities are definedClosedGo MAEDA

Actions
Actions #2

Updated by Go MAEDA over 1 year ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Go MAEDA over 1 year ago

  • Target version changed from Candidate for next major release to 5.1.0

Setting the target version to 5.1.0.

Actions #4

Updated by Go MAEDA over 1 year ago

  • Related to Feature #12745: Disable the default "Description/Status/Priority" field added
Actions #5

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r22185.

Actions #6

Updated by Go MAEDA over 1 year ago

  • 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
Actions #7

Updated by Go MAEDA over 1 year ago

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.

Actions #8

Updated by Go MAEDA over 1 year ago

  • Status changed from Reopened to Closed
Actions #9

Updated by Go MAEDA over 1 year ago

  • Related to Feature #35796: Allow subject and priority issue attributes (i.e. tracker fields) to be disablable added
Actions #10

Updated by Go MAEDA 6 months ago

  • Related to Defect #40860: Creating a new issue fails with an internal error if no issue priorities are defined added
Actions

Also available in: Atom PDF