diff options
Diffstat (limited to 'app/assets/javascripts/issues-bulk-assignment.js')
-rw-r--r-- | app/assets/javascripts/issues-bulk-assignment.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/issues-bulk-assignment.js b/app/assets/javascripts/issues-bulk-assignment.js index 8ca90490426..62a7fc9a06c 100644 --- a/app/assets/javascripts/issues-bulk-assignment.js +++ b/app/assets/javascripts/issues-bulk-assignment.js @@ -1,14 +1,17 @@ (function() { this.IssuableBulkActions = (function() { function IssuableBulkActions(opts) { + // Set defaults var ref, ref1, ref2; if (opts == null) { opts = {}; } this.container = (ref = opts.container) != null ? ref : $('.content'), this.form = (ref1 = opts.form) != null ? ref1 : this.getElement('.bulk-update'), this.issues = (ref2 = opts.issues) != null ? ref2 : this.getElement('.issuable-list > li'); + // Save instance this.form.data('bulkActions', this); this.willUpdateLabels = false; this.bindEvents(); + // Fixes bulk-assign not working when navigating through pages Issuable.initChecks(); } @@ -86,6 +89,7 @@ ref1 = this.getLabelsFromSelection(); for (j = 0, len1 = ref1.length; j < len1; j++) { id = ref1[j]; + // Only the ones that we are not going to keep if (labelsToKeep.indexOf(id) === -1) { result.push(id); } @@ -147,6 +151,8 @@ indeterminatedLabels = this.getUnmarkedIndeterminedLabels(); labelsToApply = this.getLabelsToApply(); indeterminatedLabels.map(function(id) { + // We need to exclude label IDs that will be applied + // By not doing this will cause issues from selection to not add labels at all if (labelsToApply.indexOf(id) === -1) { return result.push(id); } |