summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-30 20:18:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-04-30 20:18:28 +0000
commit7faf77804d17db13112cb53de95871aeb561fb2b (patch)
tree48f3f3f9a5c3b030fa7fb81abad57f1eb64aff04 /app/controllers
parentd94bcd285abb2b6f37747168f7aeeff1da856be3 (diff)
downloadredmine-7faf77804d17db13112cb53de95871aeb561fb2b.tar.gz
redmine-7faf77804d17db13112cb53de95871aeb561fb2b.zip
Subproject name added in csv and pdf exports.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@496 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 0f68f8006..6d8c3863e 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -280,7 +280,7 @@ class ProjectsController < ApplicationController
render :action => 'list_issues' and return unless @query.valid?
@issues = Issue.find :all, :order => sort_clause,
- :include => [ :assigned_to, :author, :status, :tracker, :priority, {:custom_values => :custom_field} ],
+ :include => [ :assigned_to, :author, :status, :tracker, :priority, :project, {:custom_values => :custom_field} ],
:conditions => @query.statement,
:limit => Setting.issues_export_limit
@@ -289,6 +289,7 @@ class ProjectsController < ApplicationController
CSV::Writer.generate(export, l(:general_csv_separator)) do |csv|
# csv header fields
headers = [ "#", l(:field_status),
+ l(:field_project),
l(:field_tracker),
l(:field_priority),
l(:field_subject),
@@ -307,9 +308,10 @@ class ProjectsController < ApplicationController
# csv lines
@issues.each do |issue|
fields = [issue.id, issue.status.name,
+ issue.project.name,
issue.tracker.name,
issue.priority.name,
- issue.subject,
+ issue.subject,
(issue.assigned_to ? issue.assigned_to.name : ""),
issue.author.name,
issue.start_date ? l_date(issue.start_date) : nil,
@@ -337,7 +339,7 @@ class ProjectsController < ApplicationController
render :action => 'list_issues' and return unless @query.valid?
@issues = Issue.find :all, :order => sort_clause,
- :include => [ :author, :status, :tracker, :priority, :custom_values ],
+ :include => [ :author, :status, :tracker, :priority, :project, :custom_values ],
:conditions => @query.statement,
:limit => Setting.issues_export_limit