]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6294 Show "isDefault" attribute even when false
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 14 Apr 2015 11:20:33 +0000 (13:20 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Tue, 14 Apr 2015 11:20:33 +0000 (13:20 +0200)
server/sonar-server/src/main/java/org/sonar/server/qualityprofile/ws/QProfileSearchAction.java
server/sonar-server/src/test/resources/org/sonar/server/qualityprofile/ws/QProfileSearchActionTest/search.json

index ee9d94e83ac707426e453c70c918f0ff17c27ad0..9560c6b1422c1bb0445bba347ec1968de8ee713b 100644 (file)
@@ -145,8 +145,8 @@ public class QProfileSearchAction implements BaseQProfileWsAction {
       if (fieldIsNeeded(FIELD_IS_INHERITED, fields)) {
         json.prop(FIELD_IS_INHERITED, profile.isInherited());
       }
-      if (fieldIsNeeded(FIELD_IS_DEFAULT, fields) && profile.isDefault()) {
-        json.prop(FIELD_IS_DEFAULT, true);
+      if (fieldIsNeeded(FIELD_IS_DEFAULT, fields)) {
+        json.prop(FIELD_IS_DEFAULT, profile.isDefault());
       }
       json.endObject();
     }
index 1d49787a6c6842acd0055aedc95fe3e74ee78e20..b800f3a3bce3cee0e9d6aa347c3ce35065c5210c 100644 (file)
@@ -15,6 +15,7 @@
       "language": "xoo2",
       "languageName": "Xoo2",
       "isInherited": true,
+      "isDefault": false,
       "parentKey": "sonar-way-xoo2-23456",
       "parentName": "Sonar way",
       "activeRuleCount": 33
@@ -25,6 +26,7 @@
       "language": "xoo2",
       "languageName": "Xoo2",
       "isInherited": false,
+      "isDefault": false,
       "activeRuleCount": 0
     }
   ]