@@ -49,47 +49,45 class ReportsController < ApplicationController | |||||
49 | @rows = @project.trackers |
|
49 | @rows = @project.trackers | |
50 | @data = issues_by_tracker |
|
50 | @data = issues_by_tracker | |
51 | @report_title = l(:field_tracker) |
|
51 | @report_title = l(:field_tracker) | |
52 | render :template => "reports/issue_report_details" |
|
|||
53 | when "version" |
|
52 | when "version" | |
54 | @field = "fixed_version_id" |
|
53 | @field = "fixed_version_id" | |
55 | @rows = @project.shared_versions.sort |
|
54 | @rows = @project.shared_versions.sort | |
56 | @data = issues_by_version |
|
55 | @data = issues_by_version | |
57 | @report_title = l(:field_version) |
|
56 | @report_title = l(:field_version) | |
58 | render :template => "reports/issue_report_details" |
|
|||
59 | when "priority" |
|
57 | when "priority" | |
60 | @field = "priority_id" |
|
58 | @field = "priority_id" | |
61 | @rows = IssuePriority.all |
|
59 | @rows = IssuePriority.all | |
62 | @data = issues_by_priority |
|
60 | @data = issues_by_priority | |
63 | @report_title = l(:field_priority) |
|
61 | @report_title = l(:field_priority) | |
64 | render :template => "reports/issue_report_details" |
|
|||
65 | when "category" |
|
62 | when "category" | |
66 | @field = "category_id" |
|
63 | @field = "category_id" | |
67 | @rows = @project.issue_categories |
|
64 | @rows = @project.issue_categories | |
68 | @data = issues_by_category |
|
65 | @data = issues_by_category | |
69 | @report_title = l(:field_category) |
|
66 | @report_title = l(:field_category) | |
70 | render :template => "reports/issue_report_details" |
|
|||
71 | when "assigned_to" |
|
67 | when "assigned_to" | |
72 | @field = "assigned_to_id" |
|
68 | @field = "assigned_to_id" | |
73 | @rows = @project.members.collect { |m| m.user }.sort |
|
69 | @rows = @project.members.collect { |m| m.user }.sort | |
74 | @data = issues_by_assigned_to |
|
70 | @data = issues_by_assigned_to | |
75 | @report_title = l(:field_assigned_to) |
|
71 | @report_title = l(:field_assigned_to) | |
76 | render :template => "reports/issue_report_details" |
|
|||
77 | when "author" |
|
72 | when "author" | |
78 | @field = "author_id" |
|
73 | @field = "author_id" | |
79 | @rows = @project.members.collect { |m| m.user }.sort |
|
74 | @rows = @project.members.collect { |m| m.user }.sort | |
80 | @data = issues_by_author |
|
75 | @data = issues_by_author | |
81 | @report_title = l(:field_author) |
|
76 | @report_title = l(:field_author) | |
82 | render :template => "reports/issue_report_details" |
|
|||
83 | when "subproject" |
|
77 | when "subproject" | |
84 | @field = "project_id" |
|
78 | @field = "project_id" | |
85 | @rows = @project.descendants.active |
|
79 | @rows = @project.descendants.active | |
86 | @data = issues_by_subproject |
|
80 | @data = issues_by_subproject | |
87 | @report_title = l(:field_subproject) |
|
81 | @report_title = l(:field_subproject) | |
88 | render :template => "reports/issue_report_details" |
|
|||
89 | else |
|
|||
90 | redirect_to :action => 'issue_report', :id => @project |
|
|||
91 | end |
|
82 | end | |
92 |
|
83 | |||
|
84 | respond_to do |format| | |||
|
85 | if @field | |||
|
86 | format.html {} | |||
|
87 | else | |||
|
88 | format.html { redirect_to :action => 'issue_report', :id => @project } | |||
|
89 | end | |||
|
90 | end | |||
93 | end |
|
91 | end | |
94 | private |
|
92 | private | |
95 | def issues_by_tracker |
|
93 | def issues_by_tracker |
General Comments 0
You need to be logged in to leave comments.
Login now