microsoft / azure-boards-estimate

MIT License
34 stars 24 forks source link

0.5 estimate is treated as 0 in the Average #310

Closed SzaboVlad closed 6 months ago

SzaboVlad commented 7 months ago

As the title says, when we estimate using the default cards (which have 0.5 estimate) and people vote 0.5, that vote is treated as 0 when computing the average.

image

Looking at the code, I believe this comes from workItemView.tsx on line 173 when computing the sum used in the average, as it uses parseInt which will force 0.5 to be 0.

sum += parseInt(
    card!.value!.toString() ||
    "0"
);
SzaboVlad commented 7 months ago

Forgot to mention that the expected behavior would be that a 0.5 estimate is treated as 0.5 in the average. So if we vote: 1 and 0.5 on an item, the average should be 0.75 instead of 0.5 as it is now.

AminTi commented 7 months ago

Thank you for bringing this issue to our attention, it will be addressed and resolved in an upcoming update.