Feature #19378 » issue_summary_add_summary_by_status.patch
| app/controllers/reports_controller.rb (working copy) | ||
|---|---|---|
|
@assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort
|
||
|
@authors = @project.users.sort
|
||
|
@subprojects = @project.descendants.visible
|
||
|
@statuses = IssueStatus.all
|
||
|
@issues_by_tracker = Issue.by_tracker(@project)
|
||
|
@issues_by_version = Issue.by_version(@project)
|
||
| ... | ... | |
|
@issues_by_assigned_to = Issue.by_assigned_to(@project)
|
||
|
@issues_by_author = Issue.by_author(@project)
|
||
|
@issues_by_subproject = Issue.by_subproject(@project) || []
|
||
|
@issues_by_status = Issue.by_status(@project)
|
||
|
render :template => "reports/issue_report"
|
||
|
end
|
||
| app/models/issue.rb (working copy) | ||
|---|---|---|
|
r.reject {|r| r["project_id"] == project.id.to_s}
|
||
|
end
|
||
|
def self.by_status(project)
|
||
|
count_and_group_by(:project => project,
|
||
|
:field => 'status_id',
|
||
|
:joins => IssueStatus.table_name)
|
||
|
end
|
||
|
# Query generator for selecting groups of issue counts for a project
|
||
|
# based on specific criteria
|
||
|
#
|
||
| app/views/reports/_simple_status.html.erb (working copy) | ||
|---|---|---|
|
<% if @statuses.empty? or rows.empty? %>
|
||
|
<p><i><%=l(:label_no_data)%></i></p>
|
||
|
<% else %>
|
||
|
<table class="list issue-report">
|
||
|
<thead><tr>
|
||
|
<th></th>
|
||
|
<th><%=l(:label_total)%></th>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
|
<% for row in rows %>
|
||
|
<tr class="<%= cycle("odd", "even") %>">
|
||
|
<td class="name"><%= link_to h(row.name), aggregate_path(@project, field_name, row) %></td>
|
||
|
<td><%= aggregate_link data, { field_name => row.id }, aggregate_path(@project, field_name, row, :status_id => "*") %></td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<% end
|
||
|
reset_cycle %>
|
||
| app/views/reports/issue_report.html.erb (working copy) | ||
|---|---|---|
|
</div>
|
||
|
<div class="splitcontentright">
|
||
|
<h3><%=l(:field_status)%></h3>
|
||
|
<%= render :partial => 'simple_status', :locals => { :data => @issues_by_status, :field_name => "status_id", :rows => @statuses } %>
|
||
|
<br />
|
||
|
<h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), project_issues_report_details_path(@project, :detail => 'version') %></h3>
|
||
|
<%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %>
|
||
|
<br />
|
||
- « Previous
- 1
- 2
- Next »