Defect #12955
closedMisbehaviour in estimated time validation
0%
Description
Hi,
we've encountered some misbehaviour regarding the estimated timein Redmine.
I've attached an image which shows several bugs, which seems to relate to the validation of this values.
Here is the reference list, how to reproduce this:- Enter 999999999999999999999999999999999999999 on the estimated time, this produce an arithmetic overflow which doesn't raise an error and is automatic set to FLOAT_MAX
- Enter 9999999999 (10 times a 9) as estimated time. This should stay 9999999999 but it's getting rounded up to 10000000000
- Enter 999999999999 (12 times a 9) as estimated time. This should stay 999999999999 but it's getting down to some other weird value 999999995904, there are missing 4095 hours. This seems to be related to the exponential display. Both are 1E+12. This seems to be related to float. Float isn't the best datatype to use for such values. Consider to change the column datatype to decimal, which is supported in the current database. This is much more precise and haven't such conversion errors.
- This is the tryage to get the rounding. This references to 2.
- The helper for the estimated time doesn't check the correctness of the string. For example, you can define hours by 2h30m to get 2.5 or 3h5m to get 3.08 as timevalue. But if you enter abc or 3j (misstyped) the string isn't checked. The issue just returns "update successfully" and sets the estimated time to nil. The string should be checked and should raise some error, if the input isn't correct.
Another idea could be, to limitate the estimated hours to some maximum value. An issue with nearly 1 million hours, seems to be wrong. ;-)
Best regards,
Daniel
Files
Related issues
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
I'm quite sure we had a quite similar ticket a couple of weeks / months ago, but I can't find it. It was about time and rounding, and IIRC JPL closed it...
Updated by Daniel Felix almost 12 years ago
Hm really? I haven't found it too. I searched for something like this bevor.
But there wasn't anything which sounds like this.
Updated by Mischa The Evil almost 12 years ago
Jan is referring to issue #12680.
Updated by Daniel Felix almost 12 years ago
- Status changed from New to Closed
- Resolution set to Duplicate
You're right Mischa. I close my issue. Thanks for this hint. :-)
Updated by Daniel Felix almost 12 years ago
- Status changed from Closed to Confirmed
- Resolution deleted (
Duplicate)
Argh... to fast closed.
Point 5 isn't included in #12680.
Updated by Go MAEDA almost 7 years ago
- Related to Defect #27881: No validation errors when entering an invalid "Estimate hours" value added
Updated by Go MAEDA almost 7 years ago
- Status changed from Confirmed to Closed
- Resolution set to Duplicate