Feature #2529

Extend Issue Summary to include subprojects

Added by Ewan Makepeace almost 10 years ago. Updated 2 months ago.

Status:ClosedStart date:2009-01-19
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Issues
Target version:4.0.0
Resolution:Fixed

Description

When I view issues for a parent project I am shown issues from the parent and all sub projects mixed together. When I click the summary link on the same page the summary I am shown is for the parent project alone. This behaviour is completely unexpected and not at all obvious at first glance.

It would be extremely useful to have a summary display of ALL the issues in the parent and all subprojects rather than the parent project alone.

feature_2529.patch Magnifier (10.5 KB) Mizuki ISHIKAWA, 2018-09-14 10:31

settings.png (138 KB) Mizuki ISHIKAWA, 2018-09-14 10:33

feature_2529_v2.patch Magnifier (16 KB) Mizuki ISHIKAWA, 2018-09-28 03:55

feature_2629_v3.patch Magnifier (15.9 KB) Mizuki ISHIKAWA, 2018-10-03 03:00


Related issues

Related to Redmine - Feature #2595: Issue report for all projects New 2009-01-27
Related to Redmine - Defect #5419: Issues with shared versions from different projects do no... Closed 2010-04-30
Related to Redmine - Defect #8427: "Issue Summary" page do not show totals from subprojects ... Closed 2011-03-23
Related to Redmine - Defect #7970: Totals on the Reports page do not include subprojects Closed 2011-03-23
Related to Redmine - Feature #6222: Summary at top-level project does not show totals for all... Closed 2010-08-26
Related to Redmine - Feature #6121: Reports Summary page displays only issues of a project no... Closed 2010-08-12
Related to Redmine - Feature #4424: Rollup Subprojects Counts in Issues-Reports Closed 2009-12-16
Duplicated by Redmine - Feature #12492: enable filtering and subproject reporting for issue sum... Closed
Duplicated by Redmine - Defect #13809: Issue Summary Screen Not Showing Tickets from Sub Projects Closed

Associated revisions

Revision 17563
Added by Go MAEDA 2 months ago

Extend Issue Summary to include subprojects (#2529).

Patch by Mizuki ISHIKAWA.

History

#1 Updated by Ewan Makepeace almost 10 years ago

Just remembered - to confuse matters further, if you click any of the hyperlinks on the summary page the filtered issues list shown IS for parent and all subprojects, so the issue count does not match the value on the summary.

#2 Updated by Ewan Makepeace over 9 years ago

Extension: I realise that what I really want is a Summary report based on the issues shown on ANY issue view.

Explanation: The issue summary for a mature project quickly becomes rather irrelevant - it shows 100's of long closed issues and many of the open issues are part of that huge and growing population of 'unscheduled' items (stuff requested by idiots that we are too polite to just delete in many cases :-) Having a summary of all issues becomes less and less practical.

What would be extremely useful would be the Summary format extended to any arbitrary collection of issues:

1) Select a custom saved query or build a new one.
2) Pick Summary from the right side menu - should always be available.

It should summarise just the issues that are returned by the query. From there of course I can drill down by Assigned To, Category or Target Version (for example) which makes the query a bit more complex... but I think not impossible?

#3 Updated by Ben Blier over 9 years ago

+1

I just noticed this going through and testing the STI changes after patch #3007. The summary page does its calculations ONLY on the project you are viewing and NOT on any of its subprojects. I'm still getting a feel for the whole Ruby coding language and the Redmine project, but this seems like a extremely simple patch :)

#4 Updated by Etienne Massip over 7 years ago

  • Category set to Issues
  • Target version set to Candidate for next major release

#5 Updated by Daniel Albuschat almost 7 years ago

+1
This is really necessary for me to make use of the summary at all ;/

#6 Updated by Anthony BOUQUET almost 6 years ago

+1 for me.

My chief ask me to achieve that... It whould be good if it could be implemented natively without changing any source code :)

#7 Updated by Terence Mill over 5 years ago

duped by #12492

#8 Updated by Daniel Felix over 5 years ago

Duped by #7970 and #12492.

This should be optional on the summary. Just a small checkbox "include subprojects" which include the subprojects in the counting and everything else.
Especially on a per user base.

#9 Updated by Terence Mill over 5 years ago

I am wondering because in favour of the new admin issue setting "Display subprojects issues on main project" one could imagine all views (not only issues, gantt and calendar) will show defaukt all (subprojects issues) in any parent view if this switch is true.
However it shall be possible to be able to apply filters (with or without subprojects -selction) in every view.

#10 Updated by Luis Furtado almost 5 years ago

+1
It will be great to my use of summary report!

#11 Updated by Simon Pickles over 4 years ago

+1, summary is useless as it stands

#12 Updated by holly kusiak about 3 years ago

Any update to getting a view for subprojects in summary?

#13 Updated by Nikita Semikov about 3 years ago

+1
Summary report and reports with subprojects must be great. I need it!

#14 Updated by June Core 8 months ago

We are still in need of this feature.
If there is a plugin that will help PM with resource and prioritization on a Parent Project level please let me know.

Jc.

#15 Updated by Go MAEDA 7 months ago

  • Duplicated by Defect #13809: Issue Summary Screen Not Showing Tickets from Sub Projects added

#16 Updated by Mizuki ISHIKAWA 3 months ago

Redmine has the setting "Display subprojects issues on main projects by default".

Whether subproject issues are displayed on the issues/index is determined by the setting.

I think that the summary report should be counted in the same way as issues/index.
I attached a patch for that.

#17 Updated by Go MAEDA 3 months ago

  • Target version changed from Candidate for next major release to 4.1.0

The patch works fine for me. Issues in subprojects are counted if the value of Setting.display_subprojects_issues is true. I think the behavior is consistent with the issues list.

Setting the target version to 4.1.0.

#18 Updated by Go MAEDA 3 months ago

I had a look at the patch by Mizuki Ishikawa and found that it is better not to replace Issue.by_* methods with Issue.count_and_group_by. Instead, Issues.by_* methods should take Setting.display_subprojects_issues into account.

Issue.by_* methods are only used to show the report. It is evident from the change r3362. The change removed raw SQL from ReportsController and added Issue.by_* methods to Issues model.

In my opinion, Issue.by_* should return the same value as shown on the report page.

#19 Updated by Mizuki ISHIKAWA 3 months ago

Go MAEDA wrote:

I had a look at the patch by Mizuki Ishikawa and found that it is better not to replace Issue.by_* methods with Issue.count_and_group_by. Instead, Issues.by_* methods should take Setting.display_subprojects_issues into account.

Issue.by_* methods are only used to show the report. It is evident from the change r3362. The change removed raw SQL from ReportsController and added Issue.by_* methods to Issues model.

In my opinion, Issue.by_* should return the same value as shown on the report page.

Thank you for your feedback.
I fixed the patch to use Issue.by_* to get the necessary information.

#20 Updated by Go MAEDA 3 months ago

I have looked the patch feature_2529_v2.patch.

The patch passes an array of subprojects to with_subprojects parameter in Issue.count_and_group_by, but the parameter is supposed to be true or false. I suggest updating the patch as follows:

diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb
index 3d720c9f7..cfef2f200 100644
--- a/app/controllers/reports_controller.rb
+++ b/app/controllers/reports_controller.rb
@@ -27,7 +27,7 @@ class ReportsController < ApplicationController
     @assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
     @authors = @project.users.sort
     @subprojects = @project.descendants.visible
-    with_subprojects = Setting.display_subprojects_issues? ? @subprojects : nil
+    with_subprojects = Setting.display_subprojects_issues?
     @issues_by_tracker = Issue.by_tracker(@project, with_subprojects)
     @issues_by_version = Issue.by_version(@project, with_subprojects)
     @issues_by_priority = Issue.by_priority(@project, with_subprojects)
@@ -40,7 +40,7 @@ class ReportsController < ApplicationController
   end

   def issue_report_details
-    with_subprojects = Setting.display_subprojects_issues? ? @project.descendants.visible : nil
+    with_subprojects = Setting.display_subprojects_issues?
     case params[:detail]
     when "tracker" 
       @field = "tracker_id" 
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 03a190cf9..aa2c08b33 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1464,27 +1464,27 @@ class Issue < ActiveRecord::Base
     end
   end

-  def self.by_tracker(project, with_subprojects=nil)
+  def self.by_tracker(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :tracker, :with_subprojects => with_subprojects)
   end

-  def self.by_version(project, with_subprojects=nil)
+  def self.by_version(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :fixed_version, :with_subprojects => with_subprojects)
   end

-  def self.by_priority(project, with_subprojects=nil)
+  def self.by_priority(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :priority, :with_subprojects => with_subprojects)
   end

-  def self.by_category(project, with_subprojects=nil)
+  def self.by_category(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :category, :with_subprojects => with_subprojects)
   end

-  def self.by_assigned_to(project, with_subprojects=nil)
+  def self.by_assigned_to(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :assigned_to, :with_subprojects => with_subprojects)
   end

-  def self.by_author(project, with_subprojects=nil)
+  def self.by_author(project, with_subprojects=false)
     count_and_group_by(:project => project, :association => :author, :with_subprojects => with_subprojects)
   end

#21 Updated by Mizuki ISHIKAWA 2 months ago

Go MAEDA wrote:

I have looked the patch feature_2529_v2.patch.

The patch passes an array of subprojects to with_subprojects parameter in Issue.count_and_group_by, but the parameter is supposed to be true or false. I suggest updating the patch as follows:

[...]

Thank you for review.
The code you suggested is correct.
I will attach a patch to fix the test according to the code you suggested to me.

#22 Updated by Go MAEDA 2 months ago

  • Subject changed from Extend Issue Summary Report to optionally include sub projects to Extend Issue Summary to include subprojects
  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Target version changed from 4.1.0 to 4.0.0
  • Resolution set to Fixed

Committed the patch.

Issue Summary includes subprojects' issues when "Display subprojects issues on main projects by default" is enabled. This behavior is the same as "Issue tracking" box on the overview page of a project.

Thank you for improving Redmine.

Also available in: Atom PDF