From 0f245be04927984a75f1a97be38a6ae57fd63ca1 Mon Sep 17 00:00:00 2001 From: John van Leeuwen Date: Sun, 29 Sep 2024 14:30:51 +0200 Subject: [PATCH] feat: show actual teams/users in team alignment --- apps/backend/src/services/team-alignment.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/backend/src/services/team-alignment.ts b/apps/backend/src/services/team-alignment.ts index 72df5ed..ad204ad 100644 --- a/apps/backend/src/services/team-alignment.ts +++ b/apps/backend/src/services/team-alignment.ts @@ -28,7 +28,7 @@ export async function calcTeamAlignment( const userToTeam = initUserToTeam(teams); const result = initResult(displayModules, Object.keys(teams)); - const users = new Set(); + const actualTeams = new Set(); const parseOptions: ParseOptions = { limits, @@ -52,9 +52,8 @@ export async function calcTeamAlignment( userName = config.aliases?.[userName] || userName; - users.add(userName); - const key = calcKey(byUser, userName, userToTeam); + actualTeams.add(key); for (const change of entry.body) { for (let i = 0; i < modules.length; i++) { @@ -72,9 +71,7 @@ export async function calcTeamAlignment( } }, parseOptions); - if (byUser) { - result.teams = Array.from(users); - } + result.teams = Array.from(actualTeams).sort(); return result; }