Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
72f6f46e
Commit
72f6f46e
authored
Jun 13, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into artifacts-expire-date
parents
33db51f9
c928accd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
5 deletions
+32
-5
app/assets/javascripts/issues-bulk-assignment.js.coffee
app/assets/javascripts/issues-bulk-assignment.js.coffee
+13
-4
app/views/projects/issues/_related_branches.html.haml
app/views/projects/issues/_related_branches.html.haml
+1
-1
spec/features/issues/bulk_assigment_labels_spec.rb
spec/features/issues/bulk_assigment_labels_spec.rb
+17
-0
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
+1
-0
No files found.
app/assets/javascripts/issues-bulk-assignment.js.coffee
View file @
72f6f46e
...
...
@@ -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
app/views/projects/issues/_related_branches.html.haml
View file @
72f6f46e
...
...
@@ -6,7 +6,7 @@
%li
-
sha
=
@project
.
repository
.
find_branch
(
branch
).
target
-
pipeline
=
@project
.
pipeline
(
sha
,
branch
)
if
sha
-
if
ci_copipelinemmit
-
if
pipeline
%span
.related-branch-ci-status
=
render_pipeline_status
(
pipeline
)
%span
.related-branch-info
...
...
spec/features/issues/bulk_assigment_labels_spec.rb
View file @
72f6f46e
...
...
@@ -83,6 +83,23 @@ feature 'Issues > Labels bulk assignment', feature: true do
end
end
context
'can assign a label to all issues when label is present'
do
before
do
issue2
.
labels
<<
bug
issue2
.
labels
<<
feature
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
check
'check_all_issues'
open_labels_dropdown
[
'bug'
]
update_issues
end
it
do
expect
(
find
(
"#issue_
#{
issue1
.
id
}
"
)).
to
have_content
'bug'
expect
(
find
(
"#issue_
#{
issue2
.
id
}
"
)).
to
have_content
'bug'
end
end
context
'can bulk un-assign'
do
context
'all labels to all issues'
do
before
do
...
...
spec/lib/ci/gitlab_ci_yaml_processor_spec.rb
View file @
72f6f46e
...
...
@@ -501,6 +501,7 @@ module Ci
})
config_processor
=
GitlabCiYamlProcessor
.
new
(
config
,
path
)
builds
=
config_processor
.
builds_for_stage_and_ref
(
"test"
,
"master"
)
expect
(
builds
.
size
).
to
eq
(
1
)
expect
(
builds
.
first
[
:when
]).
to
eq
(
when_state
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment