Project

General

Profile

Actions

Defect #10084

closed

Disabled trackers of subprojects are listed in project overview

Added by Clemens John almost 13 years ago. Updated about 4 years ago.

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

0%

Estimated time:
Resolution:
Fixed
Affected version:

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

fixed-10084.patch (2.25 KB) fixed-10084.patch Yuichi HARADA, 2020-10-29 05:57
10084-v2.patch (2.24 KB) 10084-v2.patch Go MAEDA, 2020-12-08 02:58

Related issues

Copied to Redmine - Defect #34185: Trackers of subprojects are not displayed in the Issue summary pageClosedGo MAEDA

Actions
Actions #1

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.

Actions #2

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.

Actions #3

Updated by Go MAEDA over 4 years ago

  • Category changed from Accounts / authentication to Projects
Actions #4

Updated by Yuichi HARADA about 4 years 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
Actions #5

Updated by Yuichi HARADA about 4 years ago

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

Updated by Go MAEDA about 4 years ago

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

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.

Actions #8

Updated by Go MAEDA about 4 years ago

Go MAEDA wrote:

I slightly changed the patch:

  • Changed the test name
  • Fix RuboCop's Rails/DynamicFindBy warning

I forgot to attach the patch.

Actions #9

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.

Actions

Also available in: Atom PDF