From 119b1079c42cb176d22773e0e029023152a79c4b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Thu, 29 Jun 2017 15:49:14 +0200 Subject: [PATCH] SONAR-9483 Reset the compareToProfile parameter when an action is done on the quality profil facet --- .../js/apps/coding-rules/facets/quality-profile-facet.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }, -- 2.39.5