Defect #31779

Total estimated time column shown even when estimated time field is deactivated

Added by Felix Schäfer 4 months ago. Updated about 1 month ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues list
Target version:3.4.12
Resolution:Fixed Affected version:

Description

Even when the estimated time field is deactivated in the trackers available in the issue list the total estimated time column is available. This diff patches this issue, though maybe fixing it in Tracker.disabled_core_fields would be better.

--- a/app/models/issue_query.rb
+++ b/app/models/issue_query.rb
@@ -288,6 +288,7 @@ class IssueQuery < Query
     end

     disabled_fields = Tracker.disabled_core_fields(trackers).map {|field| field.sub(/_id$/, '')}
+    disabled_fields << "total_estimated_hours" if disabled_fields.include?("estimated_hours")
     @available_columns.reject! {|column|
       disabled_fields.include?(column.name.to_s)
     }


31779_add_test.patch Magnifier (1.12 KB) Yuichi HARADA, 2019-09-18 06:58

Associated revisions

Revision 18743
Added by Jean-Philippe Lang about 1 month ago

Fixed that total estimated time column is shown even when estimated time field is deactivated (#31779).

Patch by Felix Schäfer and Yuichi HARADA.

Revision 18744
Added by Jean-Philippe Lang about 1 month ago

Merged r18743 to 4.0-stable (#31779).

Revision 18745
Added by Jean-Philippe Lang about 1 month ago

Merged r18743 to 3.4-stable (#31779).

History

#1 Updated by Kevin Fischer 4 months ago

Since it's not a "core field" in the original sense, fixing it here seems good to me
+1

#2 Updated by Go MAEDA 3 months ago

  • Target version set to 4.0.5

#3 Updated by Yuichi HARADA 2 months ago

Felix Schäfer wrote:

Even when the estimated time field is deactivated in the trackers available in the issue list the total estimated time column is available. This diff patches this issue, though maybe fixing it in Tracker.disabled_core_fields would be better.

[...]

I created a test. I attached a patch.

#4 Updated by Go MAEDA 2 months ago

  • Target version changed from 4.0.5 to 3.4.12

#5 Updated by Jean-Philippe Lang about 1 month ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

Committed, thanks.

Also available in: Atom PDF