diff options
author | Go MAEDA <maeda@farend.jp> | 2022-07-21 04:13:37 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2022-07-21 04:13:37 +0000 |
commit | 0c037a7b48e061fa32e96c21718b30560431c4c7 (patch) | |
tree | feba0bcd09960e044151cdafd0b69f740b098918 /app/controllers | |
parent | cfbc2e7a33cb068f1dd71b06a2625ebeecd56ccb (diff) | |
download | redmine-0c037a7b48e061fa32e96c21718b30560431c4c7.tar.gz redmine-0c037a7b48e061fa32e96c21718b30560431c4c7.zip |
CSV export of issues report (#37362).
Patch by Mizuki ISHIKAWA.
git-svn-id: https://svn.redmine.org/redmine/trunk@21732 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/reports_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index d818e0b08..1cac99655 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -21,6 +21,7 @@ class ReportsController < ApplicationController menu_item :issues before_action :find_project, :authorize, :find_issue_statuses + include ReportsHelper def issue_report with_subprojects = Setting.display_subprojects_issues? @trackers = @project.rolled_up_trackers(with_subprojects).visible @@ -82,6 +83,14 @@ class ReportsController < ApplicationController else render_404 end + respond_to do |format| + format.html + format.csv do + send_data(issue_report_details_to_csv(@field, @statuses, @rows, @data), + :type => 'text/csv; header=present', + :filename => "report-#{params[:detail]}.csv") + end + end end private |