プロジェクト

全般

プロフィール

Vote #71263

完了

Disabled trackers of subprojects are listed in project overview

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
2
version_id:
152
issue_org_id:
10084
author_id:
48736
assigned_to_id:
332
comments:
9
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
39
ステータス-->[Closed]

説明

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


journals

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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.

<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I slightly changed the patch:
>
> * Changed the test name
> * Fix RuboCop's Rails/DynamicFindBy warning

I forgot to attach the patch.

--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------


related_issues

copied_to,Closed,34185,Trackers of subprojects are not displayed in the Issue summary page

Admin Redmine さんが3年以上前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン4.2.0_152 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0