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
iv
gitlab-ce
Commits
3ada1d7e
Commit
3ada1d7e
authored
Mar 02, 2014
by
Jason Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added option to remove issue assignee on project issue page and issue edit page
parent
a9dcfd85
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
2 deletions
+65
-2
CHANGELOG
CHANGELOG
+2
-1
app/assets/javascripts/project_users_select.js.coffee
app/assets/javascripts/project_users_select.js.coffee
+16
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+47
-0
No files found.
CHANGELOG
View file @
3ada1d7e
...
@@ -7,6 +7,7 @@ v 6.7.0
...
@@ -7,6 +7,7 @@ v 6.7.0
- Piwik Integration (Sebastian Winkler)
- Piwik Integration (Sebastian Winkler)
- Show contribution guide link for new issue form (Jeroen van Baarsen)
- Show contribution guide link for new issue form (Jeroen van Baarsen)
- Fix CI status for merge requests from fork
- Fix CI status for merge requests from fork
- Added option to remove issue assignee on project issue page and issue edit page (Jason Blanchard)
v 6.6.2
v 6.6.2
- Fix 500 error on branch/tag create or remove via UI
- Fix 500 error on branch/tag create or remove via UI
...
@@ -664,4 +665,4 @@ v 0.8.0
...
@@ -664,4 +665,4 @@ v 0.8.0
- stability
- stability
- security fixes
- security fixes
- increased test coverage
- increased test coverage
- email notification
- email notification
\ No newline at end of file
app/assets/javascripts/project_users_select.js.coffee
View file @
3ada1d7e
...
@@ -10,6 +10,16 @@
...
@@ -10,6 +10,16 @@
query
:
(
query
)
->
query
:
(
query
)
->
Api
.
projectUsers
project_id
,
query
.
term
,
(
users
)
->
Api
.
projectUsers
project_id
,
query
.
term
,
(
users
)
->
data
=
{
results
:
users
}
data
=
{
results
:
users
}
nullUser
=
{
name
:
'Unassigned'
,
avatar
:
null
,
username
:
'none'
,
id
:
''
}
data
.
results
.
unshift
(
nullUser
)
query
.
callback
(
data
)
query
.
callback
(
data
)
initSelection
:
(
element
,
callback
)
->
initSelection
:
(
element
,
callback
)
->
...
@@ -35,8 +45,13 @@
...
@@ -35,8 +45,13 @@
else
else
avatar
=
gon
.
relative_url_root
+
"/assets/no_avatar.png"
avatar
=
gon
.
relative_url_root
+
"/assets/no_avatar.png"
if
user
.
id
==
''
avatarMarkup
=
''
else
avatarMarkup
=
"<div class='user-image'><img class='avatar s24' src='
#{
avatar
}
'></div>"
"<div class='user-result'>
"<div class='user-result'>
<div class='user-image'><img class='avatar s24' src='
#{
avatar
}
'></div>
#{
avatarMarkup
}
<div class='user-name'>
#{
user
.
name
}
</div>
<div class='user-name'>
#{
user
.
name
}
</div>
<div class='user-username'>
#{
user
.
username
}
</div>
<div class='user-username'>
#{
user
.
username
}
</div>
</div>"
</div>"
...
...
spec/features/issues_spec.rb
View file @
3ada1d7e
...
@@ -43,6 +43,31 @@ describe "Issues" do
...
@@ -43,6 +43,31 @@ describe "Issues" do
page
.
should
have_content
project
.
name
page
.
should
have_content
project
.
name
end
end
end
end
end
describe
"Editing issue assignee"
do
let!
(
:issue
)
do
create
(
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
)
end
it
'allows user to select unasigned'
,
:js
=>
true
do
visit
edit_project_issue_path
(
project
,
issue
)
page
.
should
have_content
"Assign to
#{
@user
.
name
}
"
page
.
first
(
'#s2id_issue_assignee_id'
).
click
sleep
2
# wait for ajax stuff to complete
page
.
first
(
'.user-result'
).
click
click_button
"Save changes"
page
.
should
have_content
"Assignee: Select assignee"
issue
.
reload
.
assignee
.
should
be_nil
end
end
end
describe
"Filter issue"
do
describe
"Filter issue"
do
...
@@ -245,6 +270,28 @@ describe "Issues" do
...
@@ -245,6 +270,28 @@ describe "Issues" do
page
.
should
have_content
milestone
.
title
page
.
should
have_content
milestone
.
title
end
end
end
end
describe
'removing assignee'
do
let
(
:user2
)
{
create
(
:user
)
}
before
:each
do
issue
.
assignee
=
user2
issue
.
save
end
it
'allows user to remove assignee'
,
:js
=>
true
do
visit
project_issue_path
(
project
,
issue
)
page
.
should
have_content
"Assignee:
#{
user2
.
name
}
"
page
.
first
(
'#s2id_issue_assignee_id'
).
click
sleep
2
# wait for ajax stuff to complete
page
.
first
(
'.user-result'
).
click
page
.
should
have_content
"Assignee: Unassigned"
sleep
2
# wait for ajax stuff to complete
issue
.
reload
.
assignee
.
should
be_nil
end
end
end
end
def
first_issue
def
first_issue
...
...
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