]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5680 Fix an issue with restore of issue filters (first parameter overwritten...
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 2 Oct 2014 09:25:39 +0000 (11:25 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 2 Oct 2014 13:22:01 +0000 (15:22 +0200)
server/sonar-web/src/main/js/issues/extra.js
server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb

index 6f7700c336b4d9bf4a0f34f3e84803e7b7bfe0a9..260fd8ae25d079a171e0289f1c30381cb74cafef 100644 (file)
@@ -621,12 +621,14 @@ define(
           var idObj = _.findWhere(params, { key: 'id' });
           if (idObj) {
             var that = this,
-                f = this.app.favoriteFilter;
+              f = this.app.favoriteFilter;
             this.app.canSave = false;
             f.set('id', idObj.value);
             f.fetch({
               success: function () {
-                params = _.extend({}, that.parseQuery(f.get('query')), params);
+                var parsedFilter = that.parseQuery(f.get('query'))
+                params = _.extend({}, params);
+                params = _.extent(params, parsedFilter)
                 that.loadResults(params);
               }
             });
index 5624de3a9ce54102e5c64489ae1632c097dc706f..63c9a020c9d98f7e2b3fa48b6086e7f6f105eb5c 100644 (file)
@@ -1016,6 +1016,9 @@ module ApplicationHelper
   def url_for_issues(params)
     url = ApplicationController.root_context + '/issues/search#'
     params.each do |key, value|
+      if key == 'filter'
+        key = 'id'
+      end
       url += key.to_s + '=' + value.to_s + '|'
     end
     url