https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292013-01-02T08:17:18ZRedmineRedmine - Defect #12680: Estimated Time value is corruptedhttps://www.redmine.org/issues/12680?journal_id=437032013-01-02T08:17:18ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Confirmed</i></li></ul><p>Yes, this happends when we exceed the floating-point precision:</p>
<pre>
irb(main):001:0> "%02f" % 999999999999999999999999999999.0
=> "1000000000000000019884624838656.000000"
</pre>
<p>A solution would be to validate the estimated time against a reasonable range of values (eg. 0 - 1000000), what do you think?</p> Redmine - Defect #12680: Estimated Time value is corruptedhttps://www.redmine.org/issues/12680?journal_id=449892013-01-26T09:45:19ZDaniel Felix
<ul></ul><p>Hi Jean-Philippe,</p>
<p>I give some other solution on <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Misbehaviour in estimated time validation (Closed)" href="https://www.redmine.org/issues/12955">#12955</a>.</p>
<p>What do you think about changing the datatype from float to decimal, which is much more accurate? We're using decimal in all of hour analytics, because it behaves greater on converting, has a better support for such big numbers without falling back to exponentials and is supported in all databases too.</p>
<p>This would solve this problem without the limitation of the estimated time to some value like 1.000.000.</p> Redmine - Defect #12680: Estimated Time value is corruptedhttps://www.redmine.org/issues/12680?journal_id=450462013-01-27T16:17:23ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>A numeric column still have a limitation. But the question is: do we really need to store estimated times greater than 1,000,000?</p> Redmine - Defect #12680: Estimated Time value is corruptedhttps://www.redmine.org/issues/12680?journal_id=450502013-01-27T16:41:16ZMischa The Evil
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>[...] But the question is: do we really need to store estimated times greater than 1,000,000?</p>
</blockquote>
<p>I don't think so. IMO a sane range-validation is the most pragmatic solution to workaround these - extreme edge-case - issues.</p> Redmine - Defect #12680: Estimated Time value is corruptedhttps://www.redmine.org/issues/12680?journal_id=450542013-01-27T21:12:05ZDaniel Felix
<ul></ul><p>But even with some limitation to 1.000.000, the risk of some floating point errors in timelog reports could occur. Well a good limitation would be ok, but the datatype still isn't the best.</p>