From 26b319b294847275c8d5cf48160dca914fcd29e2 Mon Sep 17 00:00:00 2001 From: Ruslan Bayandinov <45530296+wazsone@users.noreply.github.com> Date: Thu, 6 Oct 2022 00:16:08 +0700 Subject: [PATCH] Fix estimation hour floor (#2282) Signed-off-by: Ruslan Bayandinov <ruslan.bayandinov@xored.com> --- .../issues/timereport/EstimationStatsPresenter.svelte | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/tracker-resources/src/components/issues/timereport/EstimationStatsPresenter.svelte b/plugins/tracker-resources/src/components/issues/timereport/EstimationStatsPresenter.svelte index 9d0c43484f..aef0c7a275 100644 --- a/plugins/tracker-resources/src/components/issues/timereport/EstimationStatsPresenter.svelte +++ b/plugins/tracker-resources/src/components/issues/timereport/EstimationStatsPresenter.svelte @@ -27,9 +27,7 @@ $: childEstimationTime = (value.childInfo ?? []).map((it) => it.estimation).reduce((a, b) => a + b, 0) function hourFloor (value: number): number { - const days = Math.ceil(value) - const hours = value - days - return days + Math.floor(hours * 100) / 100 + return Number(value.toFixed(2)) } </script>