@@ -47,6 +47,12 class ReportsController < ApplicationController | |||||
47 | @data = issues_by_category |
|
47 | @data = issues_by_category | |
48 | @report_title = l(:field_category) |
|
48 | @report_title = l(:field_category) | |
49 | render :template => "reports/issue_report_details" |
|
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 | when "author" |
|
56 | when "author" | |
51 | @field = "author_id" |
|
57 | @field = "author_id" | |
52 | @rows = @project.members.collect { |m| m.user } |
|
58 | @rows = @project.members.collect { |m| m.user } | |
@@ -64,12 +70,14 class ReportsController < ApplicationController | |||||
64 | @versions = @project.versions.sort |
|
70 | @versions = @project.versions.sort | |
65 | @priorities = Enumeration::get_values('IPRI') |
|
71 | @priorities = Enumeration::get_values('IPRI') | |
66 | @categories = @project.issue_categories |
|
72 | @categories = @project.issue_categories | |
|
73 | @assignees = @project.members.collect { |m| m.user } | |||
67 | @authors = @project.members.collect { |m| m.user } |
|
74 | @authors = @project.members.collect { |m| m.user } | |
68 | @subprojects = @project.active_children |
|
75 | @subprojects = @project.active_children | |
69 | issues_by_tracker |
|
76 | issues_by_tracker | |
70 | issues_by_version |
|
77 | issues_by_version | |
71 | issues_by_priority |
|
78 | issues_by_priority | |
72 | issues_by_category |
|
79 | issues_by_category | |
|
80 | issues_by_assigned_to | |||
73 | issues_by_author |
|
81 | issues_by_author | |
74 | issues_by_subproject |
|
82 | issues_by_subproject | |
75 |
|
83 | |||
@@ -180,7 +188,22 private | |||||
180 | and i.project_id=#{@project.id} |
|
188 | and i.project_id=#{@project.id} | |
181 | group by s.id, s.is_closed, c.id") |
|
189 | group by s.id, s.is_closed, c.id") | |
182 | end |
|
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 | def issues_by_author |
|
207 | def issues_by_author | |
185 | @issues_by_author ||= |
|
208 | @issues_by_author ||= | |
186 | ActiveRecord::Base.connection.select_all("select s.id as status_id, |
|
209 | ActiveRecord::Base.connection.select_all("select s.id as status_id, |
@@ -4,8 +4,11 | |||||
4 | <h3><%=l(:field_tracker)%> <%= link_to image_tag('zoom_in.png'), :detail => 'tracker' %></h3> |
|
4 | <h3><%=l(:field_tracker)%> <%= link_to image_tag('zoom_in.png'), :detail => 'tracker' %></h3> | |
5 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> |
|
5 | <%= render :partial => 'simple', :locals => { :data => @issues_by_tracker, :field_name => "tracker_id", :rows => @trackers } %> | |
6 | <br /> |
|
6 | <br /> | |
7 |
<h3><%=l(:field_ |
|
7 | <h3><%=l(:field_priority)%> <%= link_to image_tag('zoom_in.png'), :detail => 'priority' %></h3> | |
8 |
<%= render :partial => 'simple', :locals => { :data => @issues_by_ |
|
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 | <br /> |
|
12 | <br /> | |
10 | <h3><%=l(:field_author)%> <%= link_to image_tag('zoom_in.png'), :detail => 'author' %></h3> |
|
13 | <h3><%=l(:field_author)%> <%= link_to image_tag('zoom_in.png'), :detail => 'author' %></h3> | |
11 | <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %> |
|
14 | <%= render :partial => 'simple', :locals => { :data => @issues_by_author, :field_name => "author_id", :rows => @authors } %> | |
@@ -13,8 +16,8 | |||||
13 | </div> |
|
16 | </div> | |
14 |
|
17 | |||
15 | <div class="splitcontentright"> |
|
18 | <div class="splitcontentright"> | |
16 |
<h3><%=l(:field_ |
|
19 | <h3><%=l(:field_version)%> <%= link_to image_tag('zoom_in.png'), :detail => 'version' %></h3> | |
17 |
<%= render :partial => 'simple', :locals => { :data => @issues_by_ |
|
20 | <%= render :partial => 'simple', :locals => { :data => @issues_by_version, :field_name => "fixed_version_id", :rows => @versions } %> | |
18 | <br /> |
|
21 | <br /> | |
19 | <% if @project.children.any? %> |
|
22 | <% if @project.children.any? %> | |
20 | <h3><%=l(:field_subproject)%> <%= link_to image_tag('zoom_in.png'), :detail => 'subproject' %></h3> |
|
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