From 76bf6dbcb87e2cccfdd5ccf12fdc7e10864574b6 Mon Sep 17 00:00:00 2001 From: Jaanus Sellin Date: Wed, 6 Nov 2024 15:04:07 +0200 Subject: [PATCH] fix: active flags double stale flags (#8673) Do not count stale flags as potentially stale flags to remove duplicates. Stale flags feel like more superior state and it should not show up under potentially stale. --- frontend/vite.config.mts | 8 ++++---- src/lib/features/project/project-read-model.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/vite.config.mts b/frontend/vite.config.mts index 858eb696e242..b25031f7b9dc 100644 --- a/frontend/vite.config.mts +++ b/frontend/vite.config.mts @@ -26,10 +26,10 @@ const vitestConfig = vitestDefineConfig({ css: { preprocessorOptions: { scss: { - api: 'modern-compiler' - } - } - } + api: 'modern-compiler', + }, + }, + }, }); export default mergeConfig( diff --git a/src/lib/features/project/project-read-model.ts b/src/lib/features/project/project-read-model.ts index 06bb57cb196e..e4c3eaecc739 100644 --- a/src/lib/features/project/project-read-model.ts +++ b/src/lib/features/project/project-read-model.ts @@ -192,7 +192,7 @@ export class ProjectReadModel implements IProjectReadModel { 'projects.id, projects.health, ' + 'count(features.name) FILTER (WHERE features.archived_at is null) AS number_of_features, ' + 'count(features.name) FILTER (WHERE features.archived_at is null and features.stale IS TRUE) AS stale_feature_count, ' + - 'count(features.name) FILTER (WHERE features.archived_at is null and features.potentially_stale IS TRUE) AS potentially_stale_feature_count', + 'count(features.name) FILTER (WHERE features.archived_at is null and features.potentially_stale IS TRUE and features.stale IS FALSE) AS potentially_stale_feature_count', ), 'project_stats.avg_time_to_prod_current_window', 'projects.archived_at',