]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5727 The bulk operation can be desynchronized with the criteria of the issue...
authorStas Vilchik <vilchiks@gmail.com>
Wed, 15 Oct 2014 09:09:45 +0000 (11:09 +0200)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 15 Oct 2014 09:10:12 +0000 (11:10 +0200)
server/sonar-web/src/main/js/issues/app.js
server/sonar-web/src/main/js/issues/extra.js

index 861636f8089fa898d0ccc7d4d44c6a1f951fddd0..63b329ead763a348e668bf25d3b3733a03d5e6bb 100644 (file)
@@ -438,11 +438,15 @@ requirejs(
 
 
       NavigatorApp.getQuery = function (withoutId) {
-        var query = this.filterBarView.getQuery();
-        if (!withoutId && this.favoriteFilter.id) {
-          query['id'] = this.favoriteFilter.id;
+        if (this.filterBarView) {
+          var query = this.filterBarView.getQuery();
+          if (!withoutId && this.favoriteFilter.id) {
+            query['id'] = this.favoriteFilter.id;
+          }
+          return query;
+        } else {
+          return {};
         }
-        return query;
       };
 
 
index 7edfb0ece402efe3eec606b2f5f466ae010f0366..5aa0662a43efc7cde0d27051914a88f990e411f5 100644 (file)
@@ -372,14 +372,18 @@ define(
 
 
         serializeData: function () {
-          var data = Marionette.ItemView.prototype.serializeData.apply(this, arguments);
+          var data = Marionette.ItemView.prototype.serializeData.apply(this, arguments),
+              bulkChangeData = this.options.app.getQuery(true),
+              bulkChangeQuery = _.map(bulkChangeData,function (v, k) {
+                return [k, encodeURIComponent(v)].join('=');
+              }).join('&');
           return _.extend(data || {}, {
             paging: this.collection.paging,
             sorting: this.collection.sorting,
             maxResultsReached: this.collection.maxResultsReached,
             appState: window.SS.appState.toJSON(),
             bulkChangeUrl: baseUrl + '/issues/bulk_change_form',
-            query: (Backbone.history.fragment || '').replace(/\|/g, '&')
+            query: bulkChangeQuery
           });
         }
       });