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
32be8bd2
Commit
32be8bd2
authored
Apr 22, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with assignee object not being returned
Closes #15515
parent
d5398e96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+21
-0
No files found.
app/controllers/projects/issues_controller.rb
View file @
32be8bd2
...
@@ -109,7 +109,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -109,7 +109,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
end
end
format
.
json
do
format
.
json
do
render
json:
@issue
.
to_json
(
include:
[
:milestone
,
labels:
{
methods: :text_color
},
assignee:
{
methods: :avatar_url
}]
)
render
json:
@issue
.
to_json
(
include:
{
milestone:
{},
assignee:
{
methods: :avatar_url
},
labels:
{
methods: :text_color
}
}
)
end
end
end
end
end
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
32be8bd2
...
@@ -154,7 +154,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -154,7 +154,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request
.
target_project
,
@merge_request
])
@merge_request
.
target_project
,
@merge_request
])
end
end
format
.
json
do
format
.
json
do
render
json:
@merge_request
.
to_json
(
include:
[
:milestone
,
labels:
{
methods: :text_color
},
assignee:
{
methods: :avatar_url
}]
)
render
json:
@merge_request
.
to_json
(
include:
{
milestone:
{},
assignee:
{
methods: :avatar_url
},
labels:
{
methods: :text_color
}
}
)
end
end
end
end
else
else
...
...
spec/features/issues_spec.rb
View file @
32be8bd2
...
@@ -317,6 +317,27 @@ describe 'Issues', feature: true do
...
@@ -317,6 +317,27 @@ describe 'Issues', feature: true do
expect
(
issue
.
reload
.
assignee
).
to
be_nil
expect
(
issue
.
reload
.
assignee
).
to
be_nil
end
end
it
'allows user to select an assignee'
,
js:
true
do
issue2
=
create
(
:issue
,
project:
project
,
author:
@user
)
visit
namespace_project_issue_path
(
project
.
namespace
,
project
,
issue2
)
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
"No assignee"
end
page
.
within
'.assignee'
do
click_link
'Edit'
end
page
.
within
'.dropdown-menu-user'
do
click_link
@user
.
name
end
page
.
within
(
'.assignee'
)
do
expect
(
page
).
to
have_content
@user
.
name
end
end
end
end
context
'by unauthorized user'
do
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