senaite.core icon indicating copy to clipboard operation
senaite.core copied to clipboard

Reference definitions are not able to handle minus values

Open Lunga001 opened this issue 1 year ago • 1 comments

Description

When adding a % difference, the min and max values are mixed up. It looks like the calculation is done without taking into account the negative values and only adding them once the calculation is done.

Reproduction guide

I added 20% as the error, and it shows the min value as -24 and the max value as -36.

Observed behaviour

This is wrong, as -36 is less than -24.

Expected behaviour

The minimum value should be -36, and the maximum value should be -24.

Versions

  • OS: Linux

Screenshot

image

Lunga001 avatar Jan 22 '24 12:01 Lunga001

Thanks @Lunga001 for reporting. Addressed with #2470.

xispa avatar Jan 30 '24 17:01 xispa