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
ed8bfed8
Commit
ed8bfed8
authored
Oct 14, 2019
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Merge branch 'rjain-remove-old-label' into 'master'"
This reverts merge request !18313
parent
e28acada
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
50 deletions
+0
-50
app/assets/javascripts/labels_select.js
app/assets/javascripts/labels_select.js
+0
-14
ee/changelogs/unreleased/rjain-remove-old-label.yml
ee/changelogs/unreleased/rjain-remove-old-label.yml
+0
-5
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+0
-31
No files found.
app/assets/javascripts/labels_select.js
View file @
ed8bfed8
...
...
@@ -32,7 +32,6 @@ export default class LabelsSelect {
$selectbox
,
$sidebarCollapsedValue
,
$value
,
$dropdownMenu
,
abilityName
,
defaultLabel
,
issueUpdateURL
,
...
...
@@ -68,7 +67,6 @@ export default class LabelsSelect {
$sidebarCollapsedValue
=
$block
.
find
(
'
.sidebar-collapsed-icon span
'
);
$sidebarLabelTooltip
=
$block
.
find
(
'
.js-sidebar-labels-tooltip
'
);
$value
=
$block
.
find
(
'
.value
'
);
$dropdownMenu
=
$dropdown
.
parent
().
find
(
'
.dropdown-menu
'
);
$loading
=
$block
.
find
(
'
.block-loading
'
).
fadeOut
();
fieldName
=
$dropdown
.
data
(
'
fieldName
'
);
initialSelected
=
$selectbox
...
...
@@ -456,21 +454,9 @@ export default class LabelsSelect {
}
$loading
.
fadeIn
();
const
oldLabels
=
boardsStore
.
detail
.
issue
.
labels
;
boardsStore
.
detail
.
issue
.
update
(
$dropdown
.
attr
(
'
data-issue-update
'
))
.
then
(()
=>
{
if
(
isScopedLabel
(
label
))
{
const
prevIds
=
oldLabels
.
map
(
label
=>
label
.
id
);
const
newIds
=
boardsStore
.
detail
.
issue
.
labels
.
map
(
label
=>
label
.
id
);
const
differentIds
=
_
.
difference
(
prevIds
,
newIds
);
$dropdown
.
data
(
'
marked
'
,
newIds
);
$dropdownMenu
.
find
(
differentIds
.
map
(
id
=>
`[data-label-id="
${
id
}
"]`
).
join
(
'
,
'
))
.
removeClass
(
'
is-active
'
);
}
})
.
then
(
fadeOutLoader
)
.
catch
(
fadeOutLoader
);
}
else
if
(
handleClick
)
{
...
...
ee/changelogs/unreleased/rjain-remove-old-label.yml
deleted
100644 → 0
View file @
e28acada
---
title
:
Scoped labels do not remove old label in board sidebar
merge_request
:
18313
author
:
type
:
fixed
spec/features/boards/sidebar_spec.rb
View file @
ed8bfed8
...
...
@@ -14,8 +14,6 @@ describe 'Issue Boards', :js do
let!
(
:bug
)
{
create
(
:label
,
project:
project
,
name:
'Bug'
)
}
let!
(
:regression
)
{
create
(
:label
,
project:
project
,
name:
'Regression'
)
}
let!
(
:stretch
)
{
create
(
:label
,
project:
project
,
name:
'Stretch'
)
}
let!
(
:scoped_label_1
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label1'
)
}
let!
(
:scoped_label_2
)
{
create
(
:label
,
project:
project
,
name:
'Scoped::Label2'
)
}
let!
(
:issue1
)
{
create
(
:labeled_issue
,
project:
project
,
assignees:
[
user
],
milestone:
milestone
,
labels:
[
development
],
relative_position:
2
)
}
let!
(
:issue2
)
{
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
,
stretch
],
relative_position:
1
)
}
let
(
:board
)
{
create
(
:board
,
project:
project
)
}
...
...
@@ -29,8 +27,6 @@ describe 'Issue Boards', :js do
end
before
do
stub_licensed_features
(
scoped_labels:
true
)
project
.
add_maintainer
(
user
)
sign_in
(
user
)
...
...
@@ -313,33 +309,6 @@ describe 'Issue Boards', :js do
expect
(
card
).
to
have_content
(
bug
.
title
)
end
it
'removes existing scoped label'
do
click_card
(
card
)
page
.
within
(
'.labels'
)
do
click_link
'Edit'
wait_for_requests
click_link
scoped_label_1
.
title
click_link
scoped_label_2
.
title
wait_for_requests
find
(
'.dropdown-menu-close-icon'
).
click
page
.
within
(
'.value'
)
do
expect
(
page
).
to
have_selector
(
'.badge'
,
count:
3
)
expect
(
page
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
page
).
to
have_content
(
scoped_label_2
.
title
)
end
end
expect
(
card
).
to
have_selector
(
'.badge'
,
count:
3
)
expect
(
card
).
not_to
have_content
(
scoped_label_1
.
title
)
expect
(
card
).
to
have_content
(
scoped_label_2
.
title
)
end
it
'adds a multiple labels'
do
click_card
(
card
)
...
...
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