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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
342434c8
Commit
342434c8
authored
Jun 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with de-selecting dropdown option in issue sidebar
Closes #18641
parent
bf4455d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
app/assets/javascripts/milestone_select.js.coffee
app/assets/javascripts/milestone_select.js.coffee
+1
-1
app/assets/javascripts/users_select.js.coffee
app/assets/javascripts/users_select.js.coffee
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+41
-0
No files found.
app/assets/javascripts/milestone_select.js.coffee
View file @
342434c8
...
...
@@ -116,7 +116,7 @@ class @MilestoneSelect
.
val
()
data
=
{}
data
[
abilityName
]
=
{}
data
[
abilityName
].
milestone_id
=
selected
data
[
abilityName
].
milestone_id
=
if
selected
?
then
selected
else
null
$loading
.
fadeIn
()
$dropdown
.
trigger
(
'loading.gl.dropdown'
)
...
...
app/assets/javascripts/users_select.js.coffee
View file @
342434c8
...
...
@@ -31,7 +31,7 @@ class @UsersSelect
assignTo
=
(
selected
)
->
data
=
{}
data
[
abilityName
]
=
{}
data
[
abilityName
].
assignee_id
=
selected
data
[
abilityName
].
assignee_id
=
if
selected
?
then
selected
else
null
$loading
.
fadeIn
()
$dropdown
.
trigger
(
'loading.gl.dropdown'
)
...
...
spec/features/issues_spec.rb
View file @
342434c8
...
...
@@ -396,6 +396,27 @@ describe 'Issues', feature: true do
expect
(
page
).
to
have_content
@user
.
name
end
end
it
'allows user to unselect themselves'
,
js:
true
do
issue2
=
create
(
:issue
,
project:
project
,
author:
@user
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue2
)
page
.
within
'.assignee'
do
click_link
'Edit'
click_link
@user
.
name
page
.
within
'.value'
do
expect
(
page
).
to
have_content
@user
.
name
end
click_link
'Edit'
click_link
@user
.
name
page
.
within
'.value'
do
expect
(
page
).
to
have_content
"No assignee"
end
end
end
end
context
'by unauthorized user'
do
...
...
@@ -440,6 +461,26 @@ describe 'Issues', feature: true do
expect
(
issue
.
reload
.
milestone
).
to
be_nil
end
it
'allows user to de-select milestone'
,
js:
true
do
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue
)
page
.
within
(
'.milestone'
)
do
click_link
'Edit'
click_link
milestone
.
title
page
.
within
'.value'
do
expect
(
page
).
to
have_content
milestone
.
title
end
click_link
'Edit'
click_link
milestone
.
title
page
.
within
'.value'
do
expect
(
page
).
to
have_content
'None'
end
end
end
end
context
'by unauthorized user'
do
...
...
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