summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-10 19:20:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-01-10 19:20:36 +0000
commita39f655a7c86fab775e725505f262692ced2c2ca (patch)
tree3d156dfcdacd56a176f2b0533e6e02422762fab8 /app/controllers
parent84cdc8f2bc932777d992e42b2273da75512b2093 (diff)
downloadredmine-a39f655a7c86fab775e725505f262692ced2c2ca.tar.gz
redmine-a39f655a7c86fab775e725505f262692ced2c2ca.zip
Added details by assignees on issue summary view (Hans Yoon).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1052 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/reports_controller.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb
index e18e117a6..e33fe8412 100644
--- a/app/controllers/reports_controller.rb
+++ b/app/controllers/reports_controller.rb
@@ -47,6 +47,12 @@ class ReportsController < ApplicationController
@data = issues_by_category
@report_title = l(:field_category)
render :template => "reports/issue_report_details"
+ when "assigned_to"
+ @field = "assigned_to_id"
+ @rows = @project.members.collect { |m| m.user }
+ @data = issues_by_assigned_to
+ @report_title = l(:field_assigned_to)
+ render :template => "reports/issue_report_details"
when "author"
@field = "author_id"
@rows = @project.members.collect { |m| m.user }
@@ -64,12 +70,14 @@ class ReportsController < ApplicationController
@versions = @project.versions.sort
@priorities = Enumeration::get_values('IPRI')
@categories = @project.issue_categories
+ @assignees = @project.members.collect { |m| m.user }
@authors = @project.members.collect { |m| m.user }
@subprojects = @project.active_children
issues_by_tracker
issues_by_version
issues_by_priority
issues_by_category
+ issues_by_assigned_to
issues_by_author
issues_by_subproject
@@ -180,7 +188,22 @@ private
and i.project_id=#{@project.id}
group by s.id, s.is_closed, c.id")
end
-
+
+ def issues_by_assigned_to
+ @issues_by_assigned_to ||=
+ ActiveRecord::Base.connection.select_all("select s.id as status_id,
+ s.is_closed as closed,
+ a.id as assigned_to_id,
+ count(i.id) as total
+ from
+ #{Issue.table_name} i, #{IssueStatus.table_name} s, #{User.table_name} a
+ where
+ i.status_id=s.id
+ and i.assigned_to_id=a.id
+ and i.project_id=#{@project.id}
+ group by s.id, s.is_closed, a.id")
+ end
+
def issues_by_author
@issues_by_author ||=
ActiveRecord::Base.connection.select_all("select s.id as status_id,