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
5e107b66
Commit
5e107b66
authored
Aug 03, 2020
by
Sean Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs and update docs
- Add changelog
parent
e0139d61
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
53 deletions
+43
-53
app/graphql/types/issue_status_counts_type.rb
app/graphql/types/issue_status_counts_type.rb
+1
-1
changelogs/unreleased/232580-issue-state-counts-graphql.yml
changelogs/unreleased/232580-issue-state-counts-graphql.yml
+5
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+1
-6
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+31
-41
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-1
spec/graphql/resolvers/issue_status_counts_resolver_spec.rb
spec/graphql/resolvers/issue_status_counts_resolver_spec.rb
+0
-0
spec/requests/api/graphql/issue_status_counts_spec.rb
spec/requests/api/graphql/issue_status_counts_spec.rb
+4
-4
No files found.
app/graphql/types/issue_status_counts_type.rb
View file @
5e107b66
...
...
@@ -3,7 +3,7 @@
module
Types
class
IssueStatusCountsType
<
BaseObject
graphql_name
'IssueStatusCountsType'
description
"Represents total number of issues for the represented
categori
es"
description
"Represents total number of issues for the represented
status
es"
authorize
:read_issue
...
...
changelogs/unreleased/232580-issue-state-counts-graphql.yml
0 → 100644
View file @
5e107b66
---
title
:
Add status counts to Issues in GraphQL
merge_request
:
38263
author
:
type
:
added
doc/api/graphql/reference/gitlab_schema.graphql
View file @
5e107b66
...
...
@@ -7253,7 +7253,7 @@ enum IssueState {
}
"""
Represents total number of issues for the represented
categori
es
Represents total number of issues for the represented
status
es
"""
type
IssueStatusCountsType
{
"""
...
...
@@ -10357,11 +10357,6 @@ type Project {
"""
search
:
String
"""
Sort
issues
by
this
criteria
"""
sort
:
IssueSort
=
created_desc
"""
Current
state
of
this
issue
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
5e107b66
...
...
@@ -15727,16 +15727,6 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "types",
"description": "Filter issues by the given issue types",
...
...
@@ -15755,6 +15745,16 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "iterationId",
"description": "Iterations applied to the issue",
...
...
@@ -20004,7 +20004,7 @@
{
"kind": "OBJECT",
"name": "IssueStatusCountsType",
"description": "Represents total number of issues for the represented
categori
es",
"description": "Represents total number of issues for the represented
status
es",
"fields": [
{
"name": "all",
...
...
@@ -30657,16 +30657,6 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "types",
"description": "Filter issues by the given issue types",
...
...
@@ -30685,6 +30675,16 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "iterationId",
"description": "Iterations applied to the issue",
...
...
@@ -30868,16 +30868,6 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "types",
"description": "Filter issues by the given issue types",
...
...
@@ -31065,16 +31055,6 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "types",
"description": "Filter issues by the given issue types",
...
...
@@ -31093,6 +31073,16 @@
},
"defaultValue": null
},
{
"name": "sort",
"description": "Sort issues by this criteria",
"type": {
"kind": "ENUM",
"name": "IssueSort",
"ofType": null
},
"defaultValue": "created_desc"
},
{
"name": "iterationId",
"description": "Iterations applied to the issue",
doc/api/graphql/reference/index.md
View file @
5e107b66
...
...
@@ -1106,7 +1106,7 @@ Autogenerated return type of IssueSetWeight
## IssueStatusCountsType
Represents total number of issues for the represented
categori
es
Represents total number of issues for the represented
status
es
| Name | Type | Description |
| --- | ---- | ---------- |
...
...
spec/graphql/resolvers/issue_status_count_resolver_spec.rb
→
spec/graphql/resolvers/issue_status_count
s
_resolver_spec.rb
View file @
5e107b66
File moved
spec/requests/api/graphql/issue_status_counts_spec.rb
View file @
5e107b66
...
...
@@ -8,8 +8,8 @@ RSpec.describe 'getting Issue counts by status' do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:issue_opened
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:issue_closed
)
{
create
(
:issue
,
:closed
,
project:
project
)
}
#
let_it_be(:other_project_issue) { create(:issue) }
let
(
:params
)
{
{
}
}
let_it_be
(
:other_project_issue
)
{
create
(
:issue
)
}
let
(
:params
)
{
{}
}
let
(
:fields
)
do
<<~
QUERY
...
...
@@ -48,11 +48,11 @@ RSpec.describe 'getting Issue counts by status' do
it_behaves_like
'a working graphql query'
it
'returns the correct counts for each status'
do
expect
(
issue_counts
).
to
eq
(
'all'
=>
3
,
'all'
=>
2
,
'opened'
=>
1
,
'closed'
=>
1
,
'merged'
=>
0
# merged is not relevant for issues
)
# but is included in the
issuable type
)
# but is included in the
return type (Gitlab::IssuablesCountForState)
end
end
end
...
...
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