Feature #2529
closedExtend Issue Summary to include subprojects
0%
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.
Files
Related issues
Updated by Ewan Makepeace almost 16 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.
Updated by Ewan Makepeace over 15 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?
Updated by Ben Blier over 15 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 :)
Updated by Etienne Massip over 13 years ago
- Category set to Issues
- Target version set to Candidate for next major release
Updated by Daniel Albuschat almost 13 years ago
+1
This is really necessary for me to make use of the summary at all ;/
Updated by Anthony BOUQUET almost 12 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 :)
Updated by Daniel Felix almost 12 years ago
Updated by Terence Mill over 11 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.
Updated by Luis Furtado about 11 years ago
+1
It will be great to my use of summary report!
Updated by holly kusiak about 9 years ago
Any update to getting a view for subprojects in summary?
Updated by Nikita Semikov about 9 years ago
+1
Summary report and reports with subprojects must be great. I need it!
Updated by June Core over 6 years 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.
Updated by Go MAEDA over 6 years ago
- Has duplicate Defect #13809: Issue Summary Screen Not Showing Tickets from Sub Projects added
Updated by Mizuki ISHIKAWA over 6 years ago
- File feature_2529.patch feature_2529.patch added
- File settings.png settings.png added
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.
Updated by Go MAEDA over 6 years 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.
Updated by Go MAEDA over 6 years 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.
Updated by Mizuki ISHIKAWA over 6 years ago
- File feature_2529_v2.patch feature_2529_v2.patch added
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 withIssue.count_and_group_by
. Instead,Issues.by_*
methods should takeSetting.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 addedIssue.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.
Updated by Go MAEDA over 6 years 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
Updated by Mizuki ISHIKAWA over 6 years ago
- File feature_2629_v3.patch feature_2629_v3.patch added
Go MAEDA wrote:
I have looked the patch feature_2529_v2.patch.
The patch passes an array of subprojects to
with_subprojects
parameter inIssue.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.
Updated by Go MAEDA over 6 years 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.
Updated by Go MAEDA about 4 years ago
- Related to Defect #34185: Trackers of subprojects are not displayed in the Issue summary page added
Updated by Mischa The Evil over 3 years ago
- Related to Defect #35664: Inconsistencies in rendering of subproject data on Issues Reports added
Updated by Mischa The Evil over 3 years ago
- Related to Feature #35647: Allow the user to properly override Setting.display_subprojects_issues on Issue Reports if a project has subprojects added