From e4ece8bcaa846469e09c19d1066a79dcc58b261c Mon Sep 17 00:00:00 2001 From: andreas-unleash Date: Wed, 10 Apr 2024 14:47:22 +0300 Subject: [PATCH] feat: ttp stat should show No data when exactly 0 (#6823) Currently the TimeToProduction stat shows `Fast` for ttp = 0 which is wrong. Absolute 0 will only happen when there are no data. Closes [1-2281](https://linear.app/unleash/issue/1-2281/timetoproduction-stat-should-not-say-fast-when-value-is-0) Before: Screenshot 2024-04-10 at 14 25 48 After: Screenshot 2024-04-10 at 14 25 38 Signed-off-by: andreas-unleash --- .../componentsStat/TimeToProduction/TimeToProduction.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/component/insights/componentsStat/TimeToProduction/TimeToProduction.tsx b/frontend/src/component/insights/componentsStat/TimeToProduction/TimeToProduction.tsx index 2436532734..bcf8687be5 100644 --- a/frontend/src/component/insights/componentsStat/TimeToProduction/TimeToProduction.tsx +++ b/frontend/src/component/insights/componentsStat/TimeToProduction/TimeToProduction.tsx @@ -47,7 +47,7 @@ const resolveValue = ( gauge: number | undefined; score: 'Fast' | 'Medium' | 'Slow' | undefined; } => { - if (daysToProduction === undefined) { + if (daysToProduction === undefined || daysToProduction === 0) { return { value: undefined, gauge: undefined,