From fbc2f2ef448d29e7900285c2b764c0dad815eab4 Mon Sep 17 00:00:00 2001 From: Viktor Vorona Date: Mon, 19 Aug 2024 10:36:12 +0200 Subject: [PATCH] SONAR-22728 Portfolio effort and last_change metrics --- .../sonar-web/src/main/js/helpers/constants.ts | 16 ++++++++++++++++ server/sonar-web/src/main/js/queries/measures.ts | 9 +++++++++ .../src/main/js/sonar-aligned/types/metrics.ts | 9 +++++++++ 3 files changed, 34 insertions(+) diff --git a/server/sonar-web/src/main/js/helpers/constants.ts b/server/sonar-web/src/main/js/helpers/constants.ts index 64f92f5c95a..ce344a72320 100644 --- a/server/sonar-web/src/main/js/helpers/constants.ts +++ b/server/sonar-web/src/main/js/helpers/constants.ts @@ -212,6 +212,22 @@ export const SOFTWARE_QUALITY_RATING_METRICS_MAP: Record = { [MetricKey.sqale_debt_ratio]: MetricKey.software_quality_maintainability_debt_ratio, [MetricKey.effort_to_reach_maintainability_rating_a]: MetricKey.effort_to_reach_software_quality_maintainability_rating_a, + [MetricKey.last_change_on_maintainability_rating]: + MetricKey.last_change_on_software_quality_maintainability_rating, + [MetricKey.last_change_on_releasability_rating]: + MetricKey.last_change_on_software_quality_releasability_rating, + [MetricKey.last_change_on_reliability_rating]: + MetricKey.last_change_on_software_quality_reliability_rating, + [MetricKey.last_change_on_security_rating]: + MetricKey.last_change_on_software_quality_security_rating, + [MetricKey.last_change_on_security_review_rating]: + MetricKey.last_change_on_software_quality_security_review_rating, + [MetricKey.maintainability_rating_effort]: + MetricKey.software_quality_maintainability_rating_effort, + [MetricKey.reliability_rating_effort]: MetricKey.software_quality_reliability_rating_effort, + [MetricKey.security_rating_effort]: MetricKey.software_quality_security_rating_effort, + [MetricKey.security_review_rating_effort]: + MetricKey.software_quality_security_review_rating_effort, [MetricKey.new_maintainability_rating]: MetricKey.new_software_quality_maintainability_rating, [MetricKey.new_maintainability_rating_distribution]: MetricKey.new_software_quality_maintainability_rating_distribution, diff --git a/server/sonar-web/src/main/js/queries/measures.ts b/server/sonar-web/src/main/js/queries/measures.ts index 4ff54ba6a4f..5b5194bf1e0 100644 --- a/server/sonar-web/src/main/js/queries/measures.ts +++ b/server/sonar-web/src/main/js/queries/measures.ts @@ -276,6 +276,15 @@ const PORTFOLIO_OVERVIEW_METRIC_KEYS = [ MetricKey.software_quality_security_review_rating_distribution, MetricKey.software_quality_maintainability_rating_distribution, MetricKey.software_quality_reliability_rating_distribution, + MetricKey.software_quality_security_rating_effort, + MetricKey.software_quality_security_review_rating_effort, + MetricKey.software_quality_maintainability_rating_effort, + MetricKey.software_quality_reliability_rating_effort, + MetricKey.last_change_on_software_quality_maintainability_rating, + MetricKey.last_change_on_software_quality_releasability_rating, + MetricKey.last_change_on_software_quality_reliability_rating, + MetricKey.last_change_on_software_quality_security_rating, + MetricKey.last_change_on_software_quality_security_review_rating, MetricKey.new_software_quality_security_rating_distribution, MetricKey.new_software_quality_security_review_rating_distribution, MetricKey.new_software_quality_maintainability_rating_distribution, diff --git a/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts b/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts index cb25b06904b..d88e3fcf552 100644 --- a/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts +++ b/server/sonar-web/src/main/js/sonar-aligned/types/metrics.ts @@ -68,6 +68,11 @@ export enum MetricKey { last_change_on_reliability_rating = 'last_change_on_reliability_rating', last_change_on_security_rating = 'last_change_on_security_rating', last_change_on_security_review_rating = 'last_change_on_security_review_rating', + last_change_on_software_quality_maintainability_rating = 'last_change_on_software_quality_maintainability_rating', + last_change_on_software_quality_releasability_rating = 'last_change_on_software_quality_releasability_rating', + last_change_on_software_quality_reliability_rating = 'last_change_on_software_quality_reliability_rating', + last_change_on_software_quality_security_rating = 'last_change_on_software_quality_security_rating', + last_change_on_software_quality_security_review_rating = 'last_change_on_software_quality_security_review_rating', last_commit_date = 'last_commit_date', leak_projects = 'leak_projects', line_coverage = 'line_coverage', @@ -77,6 +82,7 @@ export enum MetricKey { maintainability_rating_distribution = 'maintainability_rating_distribution', software_quality_maintainability_rating_distribution = 'software_quality_maintainability_rating_distribution', maintainability_rating_effort = 'maintainability_rating_effort', + software_quality_maintainability_rating_effort = 'software_quality_maintainability_rating_effort', major_violations = 'major_violations', minor_violations = 'minor_violations', ncloc = 'ncloc', @@ -155,6 +161,7 @@ export enum MetricKey { reliability_rating_distribution = 'reliability_rating_distribution', software_quality_reliability_rating_distribution = 'software_quality_reliability_rating_distribution', reliability_rating_effort = 'reliability_rating_effort', + software_quality_reliability_rating_effort = 'software_quality_reliability_rating_effort', reliability_remediation_effort = 'reliability_remediation_effort', software_quality_reliability_remediation_effort = 'software_quality_reliability_remediation_effort', reopened_issues = 'reopened_issues', @@ -166,6 +173,7 @@ export enum MetricKey { security_rating_distribution = 'security_rating_distribution', software_quality_security_rating_distribution = 'software_quality_security_rating_distribution', security_rating_effort = 'security_rating_effort', + software_quality_security_rating_effort = 'software_quality_security_rating_effort', security_remediation_effort = 'security_remediation_effort', software_quality_security_remediation_effort = 'software_quality_security_remediation_effort', security_review_rating = 'security_review_rating', @@ -173,6 +181,7 @@ export enum MetricKey { security_review_rating_distribution = 'security_review_rating_distribution', software_quality_security_review_rating_distribution = 'software_quality_security_review_rating_distribution', security_review_rating_effort = 'security_review_rating_effort', + software_quality_security_review_rating_effort = 'software_quality_security_review_rating_effort', skipped_tests = 'skipped_tests', sonarjava_feedback = 'sonarjava_feedback', sqale_debt_ratio = 'sqale_debt_ratio', -- 2.39.5