aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com>2023-10-09 14:56:33 +0200
committersonartech <sonartech@sonarsource.com>2023-10-11 20:02:34 +0000
commit94715e8e6d59dee6994248b15837403a86441d0d (patch)
treef867caa874e74007d1149201b2ffffd377d1bdfa
parent33adffff81cd371773ab6f9ffe8513e37fad7034 (diff)
downloadsonarqube-94715e8e6d59dee6994248b15837403a86441d0d.tar.gz
sonarqube-94715e8e6d59dee6994248b15837403a86441d0d.zip
SONAR-20630 Make project creation method adhere to telemetry guidelines.
-rw-r--r--server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java2
-rw-r--r--server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
index 6d467a50146..94315180324 100644
--- a/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
+++ b/server/sonar-server-common/src/main/java/org/sonar/server/telemetry/TelemetryDataJsonWriter.java
@@ -201,7 +201,7 @@ public class TelemetryDataJsonWriter {
json.prop("ci", project.getCi());
json.prop("devopsPlatform", project.getDevopsPlatform());
json.prop(NCD_ID, project.getNcdId());
- json.prop("creationMethod", project.getCreationMethod().name());
+ json.prop("project_creation_method", project.getCreationMethod().name());
project.getBugs().ifPresent(bugs -> json.prop("bugs", bugs));
project.getVulnerabilities().ifPresent(vulnerabilities -> json.prop("vulnerabilities", vulnerabilities));
project.getSecurityHotspots().ifPresent(securityHotspots -> json.prop("securityHotspots", securityHotspots));
diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
index d23d0a2c5e7..bc98e99ad77 100644
--- a/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
+++ b/server/sonar-server-common/src/test/java/org/sonar/server/telemetry/TelemetryDataJsonWriterTest.java
@@ -447,7 +447,7 @@ public class TelemetryDataJsonWriterTest {
"developmentCost": 30,
"ncdId": 12345,
"externalSecurityReportExportedAt": 1500000,
- "creationMethod": "LOCAL_API"
+ "project_creation_method": "LOCAL_API"
},
{
"projectUuid": "uuid-1",
@@ -464,7 +464,7 @@ public class TelemetryDataJsonWriterTest {
"developmentCost": 60,
"ncdId": 12345,
"externalSecurityReportExportedAt": 1500001,
- "creationMethod": "LOCAL_API"
+ "project_creation_method": "LOCAL_API"
},
{
"projectUuid": "uuid-2",
@@ -481,7 +481,7 @@ public class TelemetryDataJsonWriterTest {
"developmentCost": 90,
"ncdId": 12345,
"externalSecurityReportExportedAt": 1500002,
- "creationMethod": "LOCAL_API"
+ "project_creation_method": "LOCAL_API"
}
]
}