]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21078 Hide SQ Upgrade event from first analysis activity item
authorAmbroise C <ambroise.christea@sonarsource.com>
Fri, 1 Dec 2023 13:59:06 +0000 (14:59 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 1 Dec 2023 20:02:43 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/overview/branches/Analysis.tsx

index 2038ba161f551cfecf62d31cd685e8eee1fcf44b..987f9a77ea8989904430dea2a833ce4bfa6757d6 100644 (file)
@@ -44,7 +44,16 @@ export function Analysis(props: Readonly<AnalysisProps>) {
   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: