Project

General

Profile

Actions

Defect #13780

closed

Spent hours have excessive flaction in PDF exported ticket list

Added by Toru Haraguchi about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
PDF export
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Duplicate
Affected version:

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.


Files

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

Related issues

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

Actions
Actions #1

Updated by Toshi MARUYAMA about 11 years ago

  • Category set to PDF export
Actions #2

Updated by Toshi MARUYAMA about 11 years ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

Duplicate with #12510.

Actions

Also available in: Atom PDF