]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9483 Reset the compareToProfile parameter when an action is done on the quality...
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 29 Jun 2017 13:49:14 +0000 (15:49 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 4 Jul 2017 14:29:36 +0000 (16:29 +0200)
server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js

index 09a232e530e7045671a7f6785957c1602e7c5591..01aa4a90a0c82de9d4b115d0042d8ecbf49dcab5 100644 (file)
@@ -82,6 +82,7 @@ export default BaseFacet.extend({
       obj.activation = true;
       obj[property] = $(e.currentTarget).data('value');
     }
+    obj.compareToProfile = null;
     this.options.app.state.updateFilter(obj);
   },
 
@@ -90,7 +91,7 @@ export default BaseFacet.extend({
     const compareProfile = this.options.app.state.get('query').compareToProfile;
     const profile = $(e.currentTarget).parents('.js-facet').data('value');
     if (compareProfile == null || compareProfile !== profile) {
-      this.options.app.state.updateFilter({ activation: 'true' });
+      this.options.app.state.updateFilter({ activation: 'true', compareToProfile: null });
     }
   },
 
@@ -101,7 +102,8 @@ export default BaseFacet.extend({
     if (compareProfile == null || compareProfile !== profile) {
       this.options.app.state.updateFilter({
         activation: 'false',
-        active_severities: null
+        active_severities: null,
+        compareToProfile: null
       });
     }
   },
@@ -115,6 +117,7 @@ export default BaseFacet.extend({
     const obj = { activation: null };
     const property = this.model.get('property');
     obj[property] = null;
+    obj.compareToProfile = null;
     this.options.app.state.updateFilter(obj);
   },