From 3b20c61f9e7da780ebfa53f2dd3413949fe6166e Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Fri, 23 Aug 2024 13:59:39 +0200 Subject: [PATCH] SONAR-22728 Fix SecurityReview filter and new_tech_debt metric --- .../src/main/js/apps/projects/components/PageSidebar.tsx | 4 ++-- server/sonar-web/src/main/js/apps/projects/query.ts | 8 ++++---- .../src/main/resources/org/sonar/l10n/core.properties | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx index 3398f06718f..966ff0e3b05 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/PageSidebar.tsx @@ -132,7 +132,7 @@ export default function PageSidebar(props: PageSidebarProps) { {...facetProps} facets={facets} property="security_review" - value={query.security_review_rating} + value={query.security_review} /> @@ -189,7 +189,7 @@ export default function PageSidebar(props: PageSidebarProps) { {...facetProps} facets={facets} property="security_review" - value={query.new_security_review_rating} + value={query.new_security_review} /> diff --git a/server/sonar-web/src/main/js/apps/projects/query.ts b/server/sonar-web/src/main/js/apps/projects/query.ts index 5dd5b964204..d8a80c99761 100644 --- a/server/sonar-web/src/main/js/apps/projects/query.ts +++ b/server/sonar-web/src/main/js/apps/projects/query.ts @@ -55,8 +55,8 @@ export function parseUrlQuery(urlQuery: RawQuery): Query { new_reliability: getAsNumericRating(urlQuery['new_reliability']), security: getAsNumericRating(urlQuery['security']), new_security: getAsNumericRating(urlQuery['new_security']), - security_review_rating: getAsNumericRating(urlQuery['security_review']), - new_security_review_rating: getAsNumericRating(urlQuery['new_security_review']), + security_review: getAsNumericRating(urlQuery['security_review']), + new_security_review: getAsNumericRating(urlQuery['new_security_review']), maintainability: getAsNumericRating(urlQuery['maintainability']), new_maintainability: getAsNumericRating(urlQuery['new_maintainability']), coverage: getAsNumericRating(urlQuery['coverage']), @@ -100,11 +100,11 @@ export function convertToFilter(query: Query, isFavorite: boolean, isLegacy: boo [ 'reliability', 'security', - 'security_review_rating', + 'security_review', 'maintainability', 'new_reliability', 'new_security', - 'new_security_review_rating', + 'new_security_review', 'new_maintainability', ].forEach((property) => pushMetricToArray(query, property, conditions, convertIssuesRating, isLegacy), diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 2389ea590ce..048ad0b33ee 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -3232,10 +3232,10 @@ metric.new_sqale_debt_ratio.description=Technical Debt Ratio of new/changed code metric.new_sqale_debt_ratio.name=Technical Debt Ratio on New Code metric.new_sqale_debt_ratio.short_name=Debt Ratio on new code metric.new_sqale_debt_ratio.extra_short_name=Debt Ratio -metric.software_quality_maintainability_debt_ratio.description=Technical Debt Ratio of new/changed code. -metric.software_quality_maintainability_debt_ratio.name=Technical Debt Ratio on New Code -metric.software_quality_maintainability_debt_ratio.short_name=Debt Ratio on new code -metric.software_quality_maintainability_debt_ratio.extra_short_name=Debt Ratio +metric.new_software_quality_maintainability_debt_ratio.description=Technical Debt Ratio of new/changed code. +metric.new_software_quality_maintainability_debt_ratio.name=Technical Debt Ratio on New Code +metric.new_software_quality_maintainability_debt_ratio.short_name=Debt Ratio on new code +metric.new_software_quality_maintainability_debt_ratio.extra_short_name=Debt Ratio metric.new_technical_debt.description=Added technical debt metric.new_technical_debt.name=Added Technical Debt metric.new_technical_debt.short_name=Added Debt -- 2.39.5