diff options
author | Léo Geoffroy <leo.geoffroy@sonarsource.com> | 2024-11-29 12:38:41 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-11-29 20:03:06 +0000 |
commit | 2c5d84b420b81d8da430581de4860f760b981106 (patch) | |
tree | a42ef73c3717c8ea87cae4aa57f6a626c630b5cb /server/sonar-server-common | |
parent | 7bfb85fef959d5f1cf12f08c88dc9d8025aba6f3 (diff) | |
download | sonarqube-2c5d84b420b81d8da430581de4860f760b981106.tar.gz sonarqube-2c5d84b420b81d8da430581de4860f760b981106.zip |
SONAR-23367 Remove mention of Server in mode emails
Diffstat (limited to 'server/sonar-server-common')
4 files changed, 18 insertions, 18 deletions
diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplate.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplate.java index c4b08c8b9d6..b3350508698 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplate.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplate.java @@ -32,8 +32,8 @@ public class MQRAndStandardModesExistTemplate implements EmailTemplate { boolean isMQREnabled = ((MQRAndStandardModesExistNotification) notification).isMQRModeEnabled(); String message = """ - In this version of SonarQube Server, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. - The SonarQube Server documentation explains more. + In this version of SonarQube, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. + The SonarQube documentation explains more. Your instance is currently using the %s. @@ -44,7 +44,7 @@ public class MQRAndStandardModesExistTemplate implements EmailTemplate { // And finally return the email that will be sent return new EmailMessage() .setMessageId(MQRAndStandardModesExistNotification.TYPE) - .setSubject("Your SonarQube Server instance is in %s" + .setSubject("Your SonarQube instance is in %s" .formatted(isMQREnabled ? "Multi-Quality Rule (MQR) Mode" : "Standard Experience")) .setPlainTextMessage(message); } diff --git a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplate.java b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplate.java index 626714b5eb3..714236e36c7 100644 --- a/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplate.java +++ b/server/sonar-server-common/src/main/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplate.java @@ -40,19 +40,19 @@ public class QualityGateMetricsUpdateTemplate implements EmailTemplate { // And finally return the email that will be sent return new EmailMessage() .setMessageId(MQRAndStandardModesExistNotification.TYPE) - .setSubject("Update your SonarQube Server's Quality Gate metrics") + .setSubject("Information about your SonarQube Quality Gate metrics") .setPlainTextMessage(message); } @NotNull private static String retrieveMessage(QualityGateMetricsUpdateNotification notification) { StringBuilder message = new StringBuilder(); - message.append("We are sending this message because this version of SonarQube Server is in "); + message.append("We are sending this message because this version of SonarQube is in "); message.append(notification.isMQRModeEnabled() ? MQR_MODE : STANDARD_EXPERIENCE); message.append(" and some of your quality gates conditions are using metrics from "); message.append(notification.isMQRModeEnabled() ? STANDARD_EXPERIENCE : MQR_MODE); message.append(".\n\nWe recommend you update them to ensure the most accurate categorization and ranking of your issues.\n\n"); - message.append("If you would like to update your quality gates, go to the Quality Gates page in the SonarQube Server UI and we will guide you through the process."); + message.append("If you would like to update your quality gates, go to the Quality Gates page in the SonarQube UI and we will guide you through the process."); return message.toString(); } } diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplateTest.java index 722001ebbd3..fe317b787ac 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/MQRAndStandardModesExistTemplateTest.java @@ -31,10 +31,10 @@ class MQRAndStandardModesExistTemplateTest { void format_whenStandardExperience_shouldReturnExpectEmailMessage() { Assertions.assertThat(underTest.format(new MQRAndStandardModesExistNotification(false))) .extracting(EmailMessage::getSubject, EmailMessage::getMessage) - .containsExactly("Your SonarQube Server instance is in Standard Experience", + .containsExactly("Your SonarQube instance is in Standard Experience", """ - In this version of SonarQube Server, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. - The SonarQube Server documentation explains more. + In this version of SonarQube, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. + The SonarQube documentation explains more. Your instance is currently using the Standard Experience. @@ -46,10 +46,10 @@ class MQRAndStandardModesExistTemplateTest { void format_whenMQRMode_shouldReturnExpectEmailMessage() { Assertions.assertThat(underTest.format(new MQRAndStandardModesExistNotification(true))) .extracting(EmailMessage::getSubject, EmailMessage::getMessage) - .containsExactly("Your SonarQube Server instance is in Multi-Quality Rule (MQR) Mode", + .containsExactly("Your SonarQube instance is in Multi-Quality Rule (MQR) Mode", """ - In this version of SonarQube Server, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. - The SonarQube Server documentation explains more. + In this version of SonarQube, there are two options to reflect the health of all the projects: Multi-Quality Rule (MQR) Mode and Standard Experience. + The SonarQube documentation explains more. Your instance is currently using the Multi-Quality Rule (MQR) Mode. diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplateTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplateTest.java index 020df4da37f..8342995b00b 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplateTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/issue/notification/QualityGateMetricsUpdateTemplateTest.java @@ -31,26 +31,26 @@ class QualityGateMetricsUpdateTemplateTest { void format_whenStandardExperience_shouldReturnExpectEmailMessage() { Assertions.assertThat(underTest.format(new QualityGateMetricsUpdateNotification(false))) .extracting(EmailMessage::getSubject, EmailMessage::getMessage) - .containsExactly("Update your SonarQube Server's Quality Gate metrics", + .containsExactly("Information about your SonarQube Quality Gate metrics", """ - We are sending this message because this version of SonarQube Server is in Standard Experience and some of your quality gates conditions are using metrics from Multi-Quality Rule (MQR) Mode. + We are sending this message because this version of SonarQube is in Standard Experience and some of your quality gates conditions are using metrics from Multi-Quality Rule (MQR) Mode. We recommend you update them to ensure the most accurate categorization and ranking of your issues. - If you would like to update your quality gates, go to the Quality Gates page in the SonarQube Server UI and we will guide you through the process."""); + If you would like to update your quality gates, go to the Quality Gates page in the SonarQube UI and we will guide you through the process."""); } @Test void format_whenMQRMode_shouldReturnExpectEmailMessage() { Assertions.assertThat(underTest.format(new QualityGateMetricsUpdateNotification(true))) .extracting(EmailMessage::getSubject, EmailMessage::getMessage) - .containsExactly("Update your SonarQube Server's Quality Gate metrics", + .containsExactly("Information about your SonarQube Quality Gate metrics", """ - We are sending this message because this version of SonarQube Server is in Multi-Quality Rule (MQR) Mode and some of your quality gates conditions are using metrics from Standard Experience. + We are sending this message because this version of SonarQube is in Multi-Quality Rule (MQR) Mode and some of your quality gates conditions are using metrics from Standard Experience. We recommend you update them to ensure the most accurate categorization and ranking of your issues. - If you would like to update your quality gates, go to the Quality Gates page in the SonarQube Server UI and we will guide you through the process."""); + If you would like to update your quality gates, go to the Quality Gates page in the SonarQube UI and we will guide you through the process."""); } @Test |