Defect #10084
closedDisabled trackers of subprojects are listed in project overview
0%
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
Files
Related issues
Updated by Go MAEDA almost 5 years 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.
Updated by Go MAEDA over 4 years 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.
Updated by Go MAEDA over 4 years ago
- Category changed from Accounts / authentication to Projects
Updated by Yuichi HARADA about 4 years ago
- File fixed-10084.patch fixed-10084.patch added
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
Updated by Yuichi HARADA about 4 years ago
- Copied to Defect #34185: Trackers of subprojects are not displayed in the Issue summary page added
Updated by Go MAEDA about 4 years ago
- Target version set to Candidate for next major release
Updated by Go MAEDA about 4 years ago
- Target version changed from Candidate for next major release to 4.2.0
The patch fixes an issue that trackers that are enabled only in subprojects are displayed in the issue tracking box in the "Overview" page even when Setting.display_subprojects_issues?
I slightly changed the patch:
- Changed the test name
- Fix RuboCop's Rails/DynamicFindBy warning
Setting the target version to 4.2.0.
Updated by Go MAEDA about 4 years ago
- File 10084-v2.patch 10084-v2.patch added
Go MAEDA wrote:
I slightly changed the patch:
- Changed the test name
- Fix RuboCop's Rails/DynamicFindBy warning
I forgot to attach the patch.
Updated by Go MAEDA about 4 years ago
- Category changed from Projects to Issues
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the fix. Thank you.