Defect #13780
Spent hours have excessive flaction in PDF exported ticket list
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | PDF export | |||
Target version: | - | |||
Resolution: | Duplicate | Affected version: | 2.2.2 |
Description
When exporting tickets list view to PDF and a ticket has a particular spent time value, the PDF exported shows excessive fraction digits. The following should be the point to be patched, but please review and fix this problem.
--- a/redmine/lib/redmine/export/pdf.rb
+++ b/redmine/lib/redmine/export/pdf.rb
@@ -251,6 +251,10 @@
if column.name == :subject
value = " " * level + value
end
+ if column.name == :spent_hours
+ value = "%.2f" % value.to_f
+ end
if value.is_a?(Date)
format_date(value)
elsif value.is_a?(Time)
Attached an example.
Related issues
History
#1
Updated by Toshi MARUYAMA almost 10 years ago
- Category set to PDF export
#2
Updated by Toshi MARUYAMA almost 10 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
Duplicate with #12510.