@@ -47,6 +47,12 class ReportsController < ApplicationController | |||
|
47 | 47 | @data = issues_by_category |
|
48 | 48 | @report_title = l(:field_category) |
|
49 | 49 | render :template => "reports/issue_report_details" |
|
50 | when "assigned_to" | |
|
51 | @field = "assigned_to_id" | |
|
52 | @rows = @project.members.collect { |m| m.user } | |
|
53 | @data = issues_by_assigned_to | |
|
54 | @report_title = l(:field_assigned_to) | |
|
55 | render :template => "reports/issue_report_details" | |
|
50 | 56 | when "author" |
|
51 | 57 | @field = "author_id" |
|
52 | 58 | @rows = @project.members.collect { |m| m.user } |
@@ -64,12 +70,14 class ReportsController < ApplicationController | |||
|
64 | 70 | @versions = @project.versions.sort |
|
65 | 71 | @priorities = Enumeration::get_values('IPRI') |
|
66 | 72 | @categories = @project.issue_categories |
|
73 | @assignees = @project.members.collect { |m| m.user } | |
|
67 | 74 | @authors = @project.members.collect { |m| m.user } |
|
68 | 75 | @subprojects = @project.active_children |
|
69 | 76 | issues_by_tracker |
|
70 | 77 | issues_by_version |
|
71 | 78 | issues_by_priority |
|
72 | 79 | issues_by_category |
|
80 | issues_by_assigned_to | |
|
73 | 81 | issues_by_author |
|
74 | 82 | issues_by_subproject |
|
75 | 83 | |
@@ -181,6 +189,21 private | |||
|
181 | 189 | group by s.id, s.is_closed, c.id") |
|
182 | 190 | end |
|
183 | 191 | |
|
192 | def issues_by_assigned_to | |
|
193 | @issues_by_assigned_to ||= | |
|
194 | ActiveRecord::Base.connection.select_all("select s.id as status_id, | |
|
195 | s.is_closed as closed, | |
|
196 | a.id as assigned_to_id, | |
|
197 | count(i.id) as total | |
|
198 | from | |
|
199 | #{Issue.table_name} i, #{IssueStatus.table_name} s, #{User.table_name} a | |
|
200 | where | |
|
201 | i.status_id=s.id | |
|
202 | and i.assigned_to_id=a.id | |
|
203 | and i.project_id=#{@project.id} | |
|
204 | group by s.id, s.is_closed, a.id") | |
|
205 | end | |
|
206 | ||
|
184 | 207 | def issues_by_author |
|
185 | 208 | @issues_by_author ||= |
|
186 | 209 | ActiveRecord::Base.connection.select_all("select s.id as status_id, |
@@ -4,8 +4,11 | |||
|
4 | 4 | <h3><%=l(:field_tracker)%> <%= link_to image_tag('zoom_in.png'), :detail => 'tracker' %></h3> |
|
5 | 5 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> |
|
6 | 6 | <br /> |
|
7 |
<h3><%=l(:field_ |
|
|
8 |
<%= render :partial => 'simple', :locals => { :data => @issues_by_ |
|
|
7 | <h3><%=l(:field_priority)%> <%= link_to image_tag('zoom_in.png'), :detail => 'priority' %></h3> | |
|
8 | <%= render :partial => 'simple', :locals => { :data => @issues_by_priority, :field_name => "priority_id", :rows => @priorities } %> | |
|
9 | <br /> | |
|
10 | <h3><%=l(:field_assigned_to)%> <%= link_to image_tag('zoom_in.png'), :detail => 'assigned_to' %></h3> | |
|
11 | <%= render :partial => 'simple', :locals => { :data => @issues_by_assigned_to, :field_name => "assigned_to_id", :rows => @assignees } %> | |
|
9 | 12 | <br /> |
|
10 | 13 | <h3><%=l(:field_author)%> <%= link_to image_tag('zoom_in.png'), :detail => 'author' %></h3> |
|
11 | 14 | <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %> |
@@ -13,8 +16,8 | |||
|
13 | 16 | </div> |
|
14 | 17 | |
|
15 | 18 | <div class="splitcontentright"> |
|
16 |
<h3><%=l(:field_ |
|
|
17 |
<%= render :partial => 'simple', :locals => { :data => @issues_by_ |
|
|
19 | <h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), :detail => 'version' %></h3> | |
|
20 | <%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %> | |
|
18 | 21 | <br /> |
|
19 | 22 | <% if @project.children.any? %> |
|
20 | 23 | <h3><%=l(:field_subproject)%> <%= link_to image_tag('zoom_in.png'), :detail => 'subproject' %></h3> |
General Comments 0
You need to be logged in to leave comments.
Login now