From: Grégoire Aubert Date: Thu, 29 Jun 2017 13:49:14 +0000 (+0200) Subject: SONAR-9483 Reset the compareToProfile parameter when an action is done on the quality... X-Git-Tag: 6.5-M2~22 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=119b1079c42cb176d22773e0e029023152a79c4b;p=sonarqube.git SONAR-9483 Reset the compareToProfile parameter when an action is done on the quality profil facet --- diff --git a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js index 09a232e530e..01aa4a90a0c 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/facets/quality-profile-facet.js @@ -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); },