From: Viktor Vorona Date: Thu, 2 Nov 2023 12:38:39 +0000 (+0100) Subject: SONAR-20690 Handle empty impacts for changelog events X-Git-Tag: 10.3.0.82913~43 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0f923cfc41e706392aef89b8b42dd19d333f3bc1;p=sonarqube.git SONAR-20690 Handle empty impacts for changelog events --- diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx index 06a73517d89..0c93cf091e7 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/Changelog.tsx @@ -139,7 +139,7 @@ export default function Changelog(props: Props) { cleanCodeAttributeCategory={event.cleanCodeAttributeCategory} /> )} - + {event.impacts && } diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts index b361587f8ec..6c6550f6eb0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/types.ts +++ b/server/sonar-web/src/main/js/apps/quality-profiles/types.ts @@ -49,7 +49,8 @@ export interface ProfileChangelogEvent { action: string; authorName?: string; cleanCodeAttributeCategory?: CleanCodeAttributeCategory; - impacts: { + // impacts should be always set in the wild. But Next currently has a specific database state for which this field is undefined. May be possible to make this field required in the future. + impacts?: { softwareQuality: SoftwareQuality; severity: SoftwareImpactSeverity; }[];