]> source.dussan.org Git - redmine.git/commitdiff
Fixed: Estimated time in issue's journal should be rounded to two decimals (#1793).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 25 Aug 2008 11:43:48 +0000 (11:43 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 25 Aug 2008 11:43:48 +0000 (11:43 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1754 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/issues_helper.rb

index 9e419ab43863717168e385013ae650b992d7d40c..c6de00c108bb79d31425a46eec7758e7949d2f6c 100644 (file)
@@ -75,6 +75,9 @@ module IssuesHelper
       when 'fixed_version_id'
         v = Version.find_by_id(detail.value) and value = v.name if detail.value
         v = Version.find_by_id(detail.old_value) and old_value = v.name if detail.old_value
+      when 'estimated_hours'
+        value = "%0.02f" % detail.value.to_f unless detail.value.blank?
+        old_value = "%0.02f" % detail.old_value.to_f unless detail.old_value.blank?
       end
     when 'cf'
       custom_field = CustomField.find_by_id(detail.prop_key)