summaryrefslogtreecommitdiffstats
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-12-12 05:40:09 +0000
committerGo MAEDA <maeda@farend.jp>2020-12-12 05:40:09 +0000
commit1e906c5ebf80c694037e8638d5ecbb52292242ee (patch)
tree2ea9b2406c19a795cf37ef72295f9a81dc0ef603 /app/controllers/projects_controller.rb
parent5d017f42be3ecdcbc63f8189cadf832b70d6b661 (diff)
downloadredmine-1e906c5ebf80c694037e8638d5ecbb52292242ee.tar.gz
redmine-1e906c5ebf80c694037e8638d5ecbb52292242ee.zip
Fix that disabled trackers of subprojects are listed in project overview (#10084).
Patch by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@20635 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index de05fdb35..c99be498e 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -175,9 +175,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