From: guillaume-peoch-sonarsource Date: Wed, 8 Nov 2023 13:45:44 +0000 (+0100) Subject: SONAR-20984 Application's Projects list metrics are not retrieved for "New code" X-Git-Tag: 9.9.3.79811~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d05dc82a384ab40fe72212d6864dd111b1c023fa;p=sonarqube.git SONAR-20984 Application's Projects list metrics are not retrieved for "New code" --- diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.tsx b/server/sonar-web/src/main/js/apps/code/components/Search.tsx index 0a95d1baece..9fe54cf31fa 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Search.tsx @@ -28,7 +28,7 @@ import { getBranchLikeQuery } from '../../../helpers/branch-like'; import { KeyboardKeys } from '../../../helpers/keycodes'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; -import { ComponentQualifier } from '../../../types/component'; +import { ComponentQualifier, isPortfolioLike } from '../../../types/component'; import { ComponentMeasure } from '../../../types/types'; interface Props { @@ -144,7 +144,9 @@ export class Search extends React.PureComponent { render() { const { component, newCodeSelected } = this.props; const { loading, query } = this.state; - const isPortfolio = ['VW', 'SVW', 'APP'].includes(component.qualifier); + + const isPortfolio = isPortfolioLike(component.qualifier); + const searchPlaceholder = getSearchPlaceholderLabel(component.qualifier as ComponentQualifier); return (