Vote #64460
完了Extend Issue Summary to include subprojects
0%
説明
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.
journals
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.
--------------------------------------------------------------------------------
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?
--------------------------------------------------------------------------------
+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 :)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
+1
This is really necessary for me to make use of the summary at all ;/
--------------------------------------------------------------------------------
+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 :)
--------------------------------------------------------------------------------
duped by #12492
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
+1
It will be great to my use of summary report!
--------------------------------------------------------------------------------
+1, summary is useless as it stands
--------------------------------------------------------------------------------
Any update to getting a view for subprojects in summary?
--------------------------------------------------------------------------------
+1
Summary report and reports with subprojects must be great. I need it!
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Redmine has the setting "Display subprojects issues on main projects by default".
!{width: 50%; border: 1px solid #ccc}settings.png!
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
I have looked the patch attachment: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:
<pre><code class="diff">
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
</code></pre>
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I have looked the patch attachment: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.
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,New,2595,Issue report for all projects
relates,Closed,5419,Issues with shared versions from different projects do not show up in Roadmap summary
relates,Closed,8427,"Issue Summary" page do not show totals from subprojects in some cases
relates,Closed,7970,Totals on the Reports page do not include subprojects
relates,Closed,6222,Summary at top-level project does not show totals for all sub-projects
relates,Closed,6121,Reports Summary page displays only issues of a project not of all its subprojects
relates,Closed,4424,Rollup Subprojects Counts in Issues-Reports
relates,Closed,34185,Trackers of subprojects are not displayed in the Issue summary page
relates,New,35664,Inconsistencies in rendering of subproject data on Issues Reports
relates,New,35647,Allow the user to properly override Setting.display_subprojects_issues on Issue Reports if a project has subprojects
duplicates,Closed,12492,enable filtering and subproject reporting for issue summary view
duplicates,Closed,13809,Issue Summary Screen Not Showing Tickets from Sub Projects