Defect #13780

Spent hours have excessive flaction in PDF exported ticket list

Added by Toru Haraguchi almost 10 years ago. Updated almost 10 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:PDF export
Target version:-
Resolution:Duplicate Affected version:2.2.2


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 == :subject
               value = "  " * level + value
+            if == :spent_hours
+              value = "%.2f" % value.to_f
+            end
             if value.is_a?(Date)
             elsif value.is_a?(Time)

Attached an example.

error_example1.pdf (276 KB) Toru Haraguchi, 2013-04-16 12:22

Related issues

Related to Redmine - Defect #12510: Issues PDF export: Spent time/Float-values aren't rounded... Closed


#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.

Also available in: Atom PDF