View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016133 | mantisbt | custom fields | public | 2013-07-03 14:40 | 2017-10-28 19:08 |
Reporter | polzin | Assigned To | vboctor | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.7.0 | ||||
Target Version | 2.8.0 | Fixed in Version | 2.8.0 | ||
Summary | 0016133: Numeric field accepts floats and displays them as numeric | ||||
Description | Interestingly, for php floats are numeric. As a consequence, there is no difference between custom fields of type "numeric" and "float". The mantis-docs say, "numeric" means "is an integer", but any numeric value may be accepted. A correct test for integer-strings is described here: For "floats" is_numeric() is sufficient, although it allows "4e1" and "0x123". Therefore, a better solution would be valuable here, too. Workaround: Use a string with regexps. :-/ | ||||
Additional Information | https://github.com/mantisbt/mantisbt/blob/master-1.2.x/core/custom_field_api.php#L1054 | ||||
Tags | No tags attached. | ||||