Skip to content

Truncate extra precision in Float values for UI presentation. #330

@benanhalt

Description

@benanhalt

E.g. weight should appear as "24.2" in the image below.

image

The values are stored in the database with greater precision than java.lang.Float, which representation they receive in Sp6. In Sp7 they seem to be passed through the backend as double precision values and are represented in JS as Number instances which are double precision. Thus, they are never truncated to single precision as happens in Sp6.

Something like Number(value.toPrecision(7)) might do the trick since single precision is roughly 7 decimal digits.

Metadata

Metadata

Assignees

No one assigned

    Labels

    1 - BugIncorrect behavior of the productimpact:fewpri:normalShould be resolved before releasing but may be deferred to the next release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions