kanbanworkflowstimelinescrumrubyroadmapproject-planningproject-managementopenprojectangularissue-trackerifcgantt-chartganttbug-trackerboardsbcf
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
2.9 KiB
95 lines
2.9 KiB
13 years ago
|
#-- encoding: UTF-8
|
||
14 years ago
|
#-- copyright
|
||
|
# ChiliProject is a project management system.
|
||
14 years ago
|
#
|
||
14 years ago
|
# Copyright (C) 2010-2011 the ChiliProject Team
|
||
14 years ago
|
#
|
||
14 years ago
|
# This program is free software; you can redistribute it and/or
|
||
|
# modify it under the terms of the GNU General Public License
|
||
|
# as published by the Free Software Foundation; either version 2
|
||
|
# of the License, or (at your option) any later version.
|
||
14 years ago
|
#
|
||
14 years ago
|
# See doc/COPYRIGHT.rdoc for more details.
|
||
|
#++
|
||
|
|
||
12 years ago
|
class Issues::ReportsController < ApplicationController
|
||
13 years ago
|
menu_item :summary_field, :only => [:issue_report]
|
||
12 years ago
|
before_filter :find_project_by_project_id, :authorize, :find_issue_statuses
|
||
18 years ago
|
|
||
12 years ago
|
def report
|
||
15 years ago
|
@trackers = @project.trackers
|
||
|
@versions = @project.shared_versions.sort
|
||
|
@priorities = IssuePriority.all
|
||
|
@categories = @project.issue_categories
|
||
|
@assignees = @project.members.collect { |m| m.user }.sort
|
||
|
@authors = @project.members.collect { |m| m.user }.sort
|
||
15 years ago
|
@subprojects = @project.descendants.visible
|
||
15 years ago
|
|
||
|
@issues_by_tracker = Issue.by_tracker(@project)
|
||
|
@issues_by_version = Issue.by_version(@project)
|
||
|
@issues_by_priority = Issue.by_priority(@project)
|
||
|
@issues_by_category = Issue.by_category(@project)
|
||
|
@issues_by_assigned_to = Issue.by_assigned_to(@project)
|
||
|
@issues_by_author = Issue.by_author(@project)
|
||
|
@issues_by_subproject = Issue.by_subproject(@project) || []
|
||
14 years ago
|
end
|
||
15 years ago
|
|
||
12 years ago
|
def report_details
|
||
18 years ago
|
case params[:detail]
|
||
|
when "tracker"
|
||
|
@field = "tracker_id"
|
||
17 years ago
|
@rows = @project.trackers
|
||
15 years ago
|
@data = Issue.by_tracker(@project)
|
||
18 years ago
|
@report_title = l(:field_tracker)
|
||
18 years ago
|
when "version"
|
||
|
@field = "fixed_version_id"
|
||
15 years ago
|
@rows = @project.shared_versions.sort
|
||
15 years ago
|
@data = Issue.by_version(@project)
|
||
18 years ago
|
@report_title = l(:field_version)
|
||
18 years ago
|
when "priority"
|
||
|
@field = "priority_id"
|
||
16 years ago
|
@rows = IssuePriority.all
|
||
15 years ago
|
@data = Issue.by_priority(@project)
|
||
18 years ago
|
@report_title = l(:field_priority)
|
||
|
when "category"
|
||
|
@field = "category_id"
|
||
|
@rows = @project.issue_categories
|
||
15 years ago
|
@data = Issue.by_category(@project)
|
||
18 years ago
|
@report_title = l(:field_category)
|
||
17 years ago
|
when "assigned_to"
|
||
|
@field = "assigned_to_id"
|
||
15 years ago
|
@rows = @project.members.collect { |m| m.user }.sort
|
||
15 years ago
|
@data = Issue.by_assigned_to(@project)
|
||
17 years ago
|
@report_title = l(:field_assigned_to)
|
||
18 years ago
|
when "author"
|
||
|
@field = "author_id"
|
||
15 years ago
|
@rows = @project.members.collect { |m| m.user }.sort
|
||
15 years ago
|
@data = Issue.by_author(@project)
|
||
18 years ago
|
@report_title = l(:field_author)
|
||
18 years ago
|
when "subproject"
|
||
|
@field = "project_id"
|
||
15 years ago
|
@rows = @project.descendants.visible
|
||
15 years ago
|
@data = Issue.by_subproject(@project) || []
|
||
13 years ago
|
@report_title = l(:label_subproject_plural)
|
||
18 years ago
|
end
|
||
15 years ago
|
|
||
15 years ago
|
respond_to do |format|
|
||
|
if @field
|
||
|
format.html {}
|
||
|
else
|
||
12 years ago
|
format.html { redirect_to report_project_issues_path(@project) }
|
||
15 years ago
|
end
|
||
|
end
|
||
15 years ago
|
end
|
||
18 years ago
|
|
||
15 years ago
|
private
|
||
|
|
||
|
def find_issue_statuses
|
||
|
@statuses = IssueStatus.find(:all, :order => 'position')
|
||
|
end
|
||
13 years ago
|
|
||
|
def default_breadcrumb
|
||
|
l(:label_summary)
|
||
|
end
|
||
19 years ago
|
end
|