Defect #10084

Disabled trackers of subprojects are listed in project overview

Added by Clemens John almost 9 years ago. Updated 21 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:Candidate for next major release
Resolution: Affected version:1.2.3

Description

Trackers that are disabled in the main project but enabled in a subproject are shown in the project overview of the main project. I think this is a small issue because you can not create a ticket in one of this trackers in the main project so the containig tickets always are (0/0).

A similar ticket was already fixed some years ago: http://www.redmine.org/issues/2550

You can comprehend this issue here: https://ticket.piraten-nds.de/projects/oldenburg
Only Posteingang, Ideen und Hinweise, Aufgaben and Sonstiges are trackers that are enabled in the main project. All other trackers are disabled in the main project but enabled in one of the sub projects. They should not be shown in the overview of the main project.

Regards
Floh1111

fixed-10084.patch Magnifier (2.25 KB) Yuichi HARADA, 2020-10-29 05:57


Related issues

Copied to Redmine - Defect #34185: Trackers of subprojects are not displayed in the Issue su... Closed

History

#1 Updated by Go MAEDA 11 months ago

I think trackers that are not enabled in subprojects should not be displayed in Issue tracking box if "Display subprojects issues on main projects by default" setting is disabled.

However, trackers disabled in the current project but enabled in subprojects should also be displayed in Issue tracking box if the setting is enabled. The reason is that issues with such trackers are displayed in the issues list.

#2 Updated by Go MAEDA 5 months ago

Go MAEDA wrote:

I think trackers that are not enabled in subprojects should not be displayed in Issue tracking box if "Display subprojects issues on main projects by default" setting is disabled.

The summary page (projects/:id/issues/report/tracker) already behave like above. The issue tracking box in the overview page should behave as the same for consistency.

#3 Updated by Go MAEDA 5 months ago

  • Category changed from Accounts / authentication to Projects

#4 Updated by Yuichi HARADA about 1 month ago

I have created a patch what trackers are not enabled in the parent project should not be shown in the Issue tracking box if "Display subprojects issues on main projects by default" setting is disabled.

diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 45fbe76aa..4fa48b86b 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -172,9 +172,10 @@ class ProjectsController < ApplicationController
     @principals_by_role = @project.principals_by_role
     @subprojects = @project.children.visible.to_a
     @news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").to_a
-    @trackers = @project.rolled_up_trackers.visible
+    with_subprojects = Setting.display_subprojects_issues?
+    @trackers = @project.rolled_up_trackers(with_subprojects).visible

-    cond = @project.project_condition(Setting.display_subprojects_issues?)
+    cond = @project.project_condition(with_subprojects)

     @open_issues_by_tracker = Issue.visible.open.where(cond).group(:tracker).count
     @total_issues_by_tracker = Issue.visible.where(cond).group(:tracker).count

#5 Updated by Yuichi HARADA about 1 month ago

  • Copied to Defect #34185: Trackers of subprojects are not displayed in the Issue summary page added

#6 Updated by Go MAEDA 21 days ago

  • Target version set to Candidate for next major release

Also available in: Atom PDF