From: Ambroise C Date: Fri, 1 Dec 2023 13:59:06 +0000 (+0100) Subject: SONAR-21078 Hide SQ Upgrade event from first analysis activity item X-Git-Tag: 10.4.0.87286~378 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c6e87529c6fbae1e5a4965e6f85d8858c789a4f2;p=sonarqube.git SONAR-21078 Hide SQ Upgrade event from first analysis activity item --- diff --git a/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx b/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx index 2038ba161f5..987f9a77ea8 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx @@ -44,7 +44,16 @@ export function Analysis(props: Readonly) { const { analysis, isFirstAnalysis, qualifier, qualityGateStatus, variations } = props; const sortedEvents = sortBy( - analysis.events.filter((event) => event.category !== ProjectAnalysisEventCategory.QualityGate), + analysis.events.filter((event) => { + switch (event.category) { + case ProjectAnalysisEventCategory.QualityGate: + return false; + case ProjectAnalysisEventCategory.SqUpgrade: + return !isFirstAnalysis; + default: + return true; + } + }), (event) => { switch (event.category) { case ProjectAnalysisEventCategory.Version: