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
246bb231
Commit
246bb231
authored
Aug 19, 2016
by
Douglas Barbosa Alexandre
Committed by
Phil Hughes
Aug 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Returns the total number of issues in the JSON response
parent
4d042afe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
app/controllers/projects/boards/issues_controller.rb
app/controllers/projects/boards/issues_controller.rb
+9
-6
spec/fixtures/api/schemas/issues.json
spec/fixtures/api/schemas/issues.json
+13
-2
No files found.
app/controllers/projects/boards/issues_controller.rb
View file @
246bb231
...
@@ -8,12 +8,15 @@ module Projects
...
@@ -8,12 +8,15 @@ module Projects
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
(
render
json:
{
only:
[
:iid
,
:title
,
:confidential
],
issues:
issues
.
as_json
(
include:
{
only:
[
:iid
,
:title
,
:confidential
],
assignee:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
include:
{
labels:
{
only:
[
:id
,
:title
,
:description
,
:color
,
:priority
],
methods:
[
:text_color
]
}
assignee:
{
only:
[
:id
,
:name
,
:username
],
methods:
[
:avatar_url
]
},
})
labels:
{
only:
[
:id
,
:title
,
:description
,
:color
,
:priority
],
methods:
[
:text_color
]
}
}),
size:
issues
.
total_count
}
end
end
def
update
def
update
...
...
spec/fixtures/api/schemas/issues.json
View file @
246bb231
{
{
"type"
:
"array"
,
"type"
:
"object"
,
"items"
:
{
"$ref"
:
"issue.json"
}
"required"
:
[
"issues"
,
"size"
],
"properties"
:
{
"issues"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"issue.json"
}
},
"size"
:
{
"type"
:
"integer"
}
},
"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