]> source.dussan.org Git - redmine.git/commitdiff
Merged r19341 from trunk to 4.0-stable (#32500).
authorGo MAEDA <maeda@farend.jp>
Fri, 6 Dec 2019 00:28:18 +0000 (00:28 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 6 Dec 2019 00:28:18 +0000 (00:28 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@19343 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/timelog_helper.rb
test/functional/timelog_report_test.rb

index 9cdfa9c13f98ddc6a5fce494b9dd5c851d4691a3..c3dd631153b7dda6e75174d9296ee021593b4dd5 100644 (file)
@@ -74,7 +74,7 @@ module TimelogHelper
   def report_to_csv(report)
     Redmine::Export::CSV.generate(:encoding => params[:encoding]) do |csv|
       # Column headers
-      headers = report.criteria.collect {|criteria| l(report.available_criteria[criteria][:label]) }
+      headers = report.criteria.collect {|criteria| l_or_humanize(report.available_criteria[criteria][:label]) }
       headers += report.periods
       headers << l(:label_total_time)
       csv << headers
index 4929ba286158c92ca4eddc4cf8917930018a456a..b25059f3d4eee08a5b5ddd9def719f7d35e08fe1 100644 (file)
@@ -246,14 +246,14 @@ class TimelogReportTest < Redmine::ControllerTest
       :columns => 'month',
       :from => "2007-01-01",
       :to => "2007-06-30",
-      :criteria => ["project", "user", "activity"],
+      :criteria => ["project", "user", "cf_10"],
       :format => "csv"
     }
     assert_response :success
     assert_equal 'text/csv', @response.content_type
     lines = @response.body.chomp.split("\n")
     # Headers
-    assert_equal 'Project,User,Activity,2007-3,2007-4,Total time', lines.first
+    assert_equal 'Project,User,Overtime,2007-3,2007-4,Total time', lines.first
     # Total row
     assert_equal 'Total time,"","",154.25,8.65,162.90', lines.last
   end