stable

Clone or download

Read-only

fix: Force the display precision of the autocomputed value

Precision is lowered low enough to now be consistent when the value is rendered on the backend and frontend side. This is only done when we want to display the information so it has no impact on the computation itself. The issue can be see by creating a user story with 2 tasks having respectively a 0.1 and 0.2 remaining effort. If you display the user story in the artifact view you will see 0.3 (due to the rules used by PHP when displaying floating point number [0]) and 0.30000000000000004 if you look at the user story in a kanban card. Fixes request #38286 Display of a computed field is done with a different precision depending on the area [0] https://www.php.net/manual/en/ini.core.php#ini.precision Change-Id: I3c9b70463ba6fe46a3d5ac701164e8b20f25d25e

Modified Files

Name
M plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_Computed.php +28 −10 Go to diff View file
M tests/rest/_fixtures/07-computedfield/project.xml +3 −3 Go to diff View file
M tests/rest/tests/ArtifactsTest.php +8 −17 Go to diff View file