Commit 5e107b66 authored by Sean Arnold's avatar Sean Arnold

Fix specs and update docs

- Add changelog
parent e0139d61
......@@ -3,7 +3,7 @@
module Types
class IssueStatusCountsType < BaseObject
graphql_name 'IssueStatusCountsType'
description "Represents total number of issues for the represented categories"
description "Represents total number of issues for the represented statuses"
authorize :read_issue
......
---
title: Add status counts to Issues in GraphQL
merge_request: 38263
author:
type: added
......@@ -7253,7 +7253,7 @@ enum IssueState {
}
"""
Represents total number of issues for the represented categories
Represents total number of issues for the represented statuses
"""
type IssueStatusCountsType {
"""
......@@ -10357,11 +10357,6 @@ type Project {
"""
search: String
"""
Sort issues by this criteria
"""
sort: IssueSort = created_desc
"""
Current state of this issue
"""
......
......@@ -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 categories",
"description": "Represents total number of issues for the represented statuses",
"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",
......@@ -1106,7 +1106,7 @@ Autogenerated return type of IssueSetWeight
## IssueStatusCountsType
Represents total number of issues for the represented categories
Represents total number of issues for the represented statuses
| Name | Type | Description |
| --- | ---- | ---------- |
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment