]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-20355 Show warning when changing parent profile
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 14 Sep 2023 09:56:04 +0000 (11:56 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 14 Sep 2023 20:02:39 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/quality-profiles/details/ChangeParentForm.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index c06c55cd985e877caa9b967f85f83c389e3f2237..04c98341fed62a0155ae5a612b6a977c3c96c868 100644 (file)
@@ -19,6 +19,7 @@
  */
 import {
   ButtonPrimary,
+  FlagMessage,
   FormField,
   InputSelect,
   LabelValueSelectOption,
@@ -103,6 +104,12 @@ export default class ChangeParentForm extends React.PureComponent<Props, State>
         isOverflowVisible
         body={
           <>
+            {profile.parentKey !== undefined && (
+              <FlagMessage variant="info" className="sw-mb-8">
+                {translate('quality_profiles.change_parent_warning')}
+              </FlagMessage>
+            )}
+
             <MandatoryFieldsExplanation />
 
             <FormField
index c68205281a7f6e13b36f72a11681137d600c00bf..34729262a1aae566d52a343650f08b828c136638 100644 (file)
@@ -1997,6 +1997,7 @@ quality_profile.lang_deprecated_x_rules={0}, {1} deprecated rule(s)
 quality_profile.x_active_rules={0} active rules
 quality_profiles.x_overridden_rules={0} overridden rules
 quality_profiles.change_parent=Change Parent
+quality_profiles.change_parent_warning=By changing the parent of this profile, any information on inherited rules that were manually disabled will be lost. This means some previously disabled rules might be re-enabled.
 quality_profiles.all_profiles=All Profiles
 quality_profiles.x_profiles={0} profile(s)
 quality_profiles.projects.select_hint=Click to associate this project with the quality profile