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
Boxiang Sun
gitlab-ce
Commits
5317f6ea
Commit
5317f6ea
authored
Aug 04, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include the Issue#assignee in the response when listing issues
parent
a8b2d7f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
app/controllers/projects/board_issues_controller.rb
app/controllers/projects/board_issues_controller.rb
+6
-1
spec/controllers/projects/board_issues_controller_spec.rb
spec/controllers/projects/board_issues_controller_spec.rb
+2
-1
spec/fixtures/api/schemas/issue.json
spec/fixtures/api/schemas/issue.json
+6
-0
No files found.
app/controllers/projects/board_issues_controller.rb
View file @
5317f6ea
...
@@ -7,7 +7,12 @@ class Projects::BoardIssuesController < Projects::ApplicationController
...
@@ -7,7 +7,12 @@ class Projects::BoardIssuesController < Projects::ApplicationController
issues
=
Boards
::
Issues
::
ListService
.
new
(
project
,
current_user
,
filter_params
).
execute
issues
=
Boards
::
Issues
::
ListService
.
new
(
project
,
current_user
,
filter_params
).
execute
issues
=
issues
.
page
(
params
[
:page
])
issues
=
issues
.
page
(
params
[
:page
])
render
json:
issues
.
as_json
(
only:
[
:iid
,
:title
,
:confidential
],
include:
{
labels:
{
only:
[
:id
,
:title
,
:color
]
}
})
render
json:
issues
.
as_json
(
only:
[
:iid
,
:title
,
:confidential
],
include:
{
assignee:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
labels:
{
only:
[
:id
,
:title
,
:color
]
}
})
end
end
def
update
def
update
...
...
spec/controllers/projects/board_issues_controller_spec.rb
View file @
5317f6ea
...
@@ -18,9 +18,10 @@ describe Projects::BoardIssuesController do
...
@@ -18,9 +18,10 @@ describe Projects::BoardIssuesController do
describe
'GET #index'
do
describe
'GET #index'
do
context
'with valid list id'
do
context
'with valid list id'
do
it
'returns issues that have the list label applied'
do
it
'returns issues that have the list label applied'
do
johndoe
=
create
(
:user
,
avatar:
fixture_file_upload
(
File
.
join
(
Rails
.
root
,
'spec/fixtures/dk.png'
)))
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
planning
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
])
create
(
:labeled_issue
,
project:
project
,
labels:
[
development
]
,
assignee:
johndoe
)
list_issues
list_id:
list2
list_issues
list_id:
list2
...
...
spec/fixtures/api/schemas/issue.json
View file @
5317f6ea
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
},
},
"title"
:
{
"type"
:
"string"
}
"title"
:
{
"type"
:
"string"
}
}
}
},
"assignee"
:
{
"id"
:
{
"type"
:
"integet"
},
"name"
:
{
"type"
:
"string"
},
"username"
:
{
"type"
:
"string"
},
"avatar_url"
:
{
"type"
:
"uri"
}
}
}
},
},
"additionalProperties"
:
false
"additionalProperties"
:
false
...
...
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