summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-05 15:23:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-05 15:23:22 +0000
commitb2ba7db4e1489fca318999214764bac82602fa26 (patch)
tree34049b578d25168a4c571ea31ba0ffa6776a20eb /app/helpers
parent4c9fcb34b68ba074e0ab1db92fbae9010cc14c5a (diff)
downloadredmine-b2ba7db4e1489fca318999214764bac82602fa26.tar.gz
redmine-b2ba7db4e1489fca318999214764bac82602fa26.zip
Time entries CSV export should include the tracker and subject of the issue (#18269).
git-svn-id: http://svn.redmine.org/redmine/trunk@13562 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/queries_helper.rb12
1 files changed, 8 insertions, 4 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 9f6c07b36..583d1b104 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -122,16 +122,20 @@ module QueriesHelper
end
end
- def csv_value(column, issue, value)
+ def csv_value(column, object, value)
format_object(value, false) do |value|
case value.class.name
when 'Float'
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
when 'IssueRelation'
- other = value.other_issue(issue)
- l(value.label_for(issue)) + " ##{other.id}"
+ other = value.other_issue(object)
+ l(value.label_for(object)) + " ##{other.id}"
when 'Issue'
- value.id
+ if object.is_a?(TimeEntry)
+ "#{value.tracker} ##{value.id}: #{value.subject}"
+ else
+ value.id
+ end
else
value
end