Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/ci/build.coffee9
-rw-r--r--app/assets/javascripts/issues-bulk-assignment.js.coffee17
2 files changed, 22 insertions, 4 deletions
diff --git a/app/assets/javascripts/ci/build.coffee b/app/assets/javascripts/ci/build.coffee
index f763ba96e33..2d515d7efa2 100644
--- a/app/assets/javascripts/ci/build.coffee
+++ b/app/assets/javascripts/ci/build.coffee
@@ -17,6 +17,8 @@ class @CiBuild
.off 'resize.build'
.on 'resize.build', @hideSidebar
+ @updateArtifactRemoveDate()
+
if $('#build-trace').length
@getInitialBuildTrace()
@initScrollButtonAffix()
@@ -103,3 +105,10 @@ class @CiBuild
$('.js-build-sidebar')
.removeClass 'right-sidebar-collapsed'
.addClass 'right-sidebar-expanded'
+
+ updateArtifactRemoveDate: ->
+ $date = $('.js-artifacts-remove')
+
+ if $date.length
+ date = $date.text()
+ $date.text $.timefor(new Date(date), ' ')
diff --git a/app/assets/javascripts/issues-bulk-assignment.js.coffee b/app/assets/javascripts/issues-bulk-assignment.js.coffee
index 16d023dd391..9dc3529a17f 100644
--- a/app/assets/javascripts/issues-bulk-assignment.js.coffee
+++ b/app/assets/javascripts/issues-bulk-assignment.js.coffee
@@ -97,13 +97,22 @@ class @IssuableBulkActions
$labels = @form.find('.labels-filter input[name="update[label_ids][]"]')
$labels.each (k, label) ->
- labelIds.push $(label).val() if label
+ labelIds.push parseInt($(label).val()) if label
labelIds
###*
- * Just an alias of @getUnmarkedIndeterminedLabels
- * @return {Array} Array of labels
+ * Returns Label IDs that will be removed from issue selection
+ * @return {Array} Array of labels IDs
###
getLabelsToRemove: ->
- @getUnmarkedIndeterminedLabels()
+ result = []
+ indeterminatedLabels = @getUnmarkedIndeterminedLabels()
+ labelsToApply = @getLabelsToApply()
+
+ indeterminatedLabels.map (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
+ result.push(id) if labelsToApply.indexOf(id) is -1
+
+ result