]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6929 Issues page loads unnecessary facets
authorStas Vilchik <vilchiks@gmail.com>
Thu, 14 Jan 2016 10:05:00 +0000 (11:05 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Thu, 14 Jan 2016 10:05:08 +0000 (11:05 +0100)
server/sonar-web/src/main/js/apps/issues/controller.js
server/sonar-web/src/main/js/components/navigator/controller.js

index 398f94344d2df1a4c6b5d40bb18054eb6ddd8cc8..31a13f246da923b76eadae64faedb93a6202a02a 100644 (file)
@@ -29,7 +29,9 @@ const FACET_DATA_FIELDS = ['components', 'users', 'rules', 'actionPlans', 'langu
 export default Controller.extend({
   _facetsFromServer: function () {
     var facets = Controller.prototype._facetsFromServer.apply(this, arguments) || [];
-    facets.push('assigned_to_me');
+    if (facets.indexOf('assignees') !== -1) {
+      facets.push('assigned_to_me');
+    }
     return facets;
   },
 
index 9de0bc89a7e72e9f6fb124a128db57395df89737..28dbfad8d01262a064b6308b2fe4bd1421e3b1d5 100644 (file)
@@ -43,6 +43,7 @@ export default Marionette.Controller.extend({
       return that.options.app.state.get('transform')[facet] != null ?
           that.options.app.state.get('transform')[facet] : facet;
     });
+    facets = _.uniq(facets);
     return facets.filter(function (facet) {
       return that.options.app.state.get('allFacets').indexOf(facet) !== -1;
     });