From be5d36b9262eec52ba5467c15d05e0ae49ba8a6c Mon Sep 17 00:00:00 2001 From: guillaume-peoch-sonarsource Date: Wed, 25 Jan 2023 13:49:40 +0100 Subject: [PATCH] SONAR-17783 Some Closed (Fixed) file-level issues are described as project-level issues --- .../ComponentSourceSnippetGroupViewer.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx index ec390c6ff94..ea109c4ff51 100644 --- a/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx +++ b/server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx @@ -27,7 +27,7 @@ import { Alert } from '../../../components/ui/Alert'; import { getBranchLikeQuery } from '../../../helpers/branch-like'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; -import { ComponentQualifier, isFile } from '../../../types/component'; +import { isFile } from '../../../types/component'; import { IssueStatus } from '../../../types/issues'; import { Dict, @@ -265,8 +265,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone }); const issueIsClosed = issue.status === IssueStatus.Closed; - const issueIsFileLevel = - issue.componentQualifier === ComponentQualifier.File && issue.componentEnabled; + const issueIsFileLevel = isFile(issue.componentQualifier) && issue.componentEnabled; const closedIssueMessageKey = issueIsFileLevel ? 'issue.closed.file_level' : 'issue.closed.project_level'; -- 2.39.5