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
1a8e7543
Commit
1a8e7543
authored
Feb 17, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose state of hidden epic board lists
- Expose via GraphQL - Add tests
parent
cfb9fa65
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
2 deletions
+69
-2
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+10
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+28
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+2
-0
ee/app/graphql/types/boards/epic_board_type.rb
ee/app/graphql/types/boards/epic_board_type.rb
+7
-0
ee/spec/graphql/types/boards/epic_board_type_spec.rb
ee/spec/graphql/types/boards/epic_board_type_spec.rb
+1
-1
ee/spec/requests/api/graphql/boards/epic_boards_query_spec.rb
...pec/requests/api/graphql/boards/epic_boards_query_spec.rb
+21
-1
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
1a8e7543
...
...
@@ -9404,6 +9404,16 @@ type EpicAddIssuePayload {
Represents an epic board
"""
type
EpicBoard
{
"""
Whether
or
not
backlog
list
is
hidden
.
"""
hideBacklogList
:
Boolean
"""
Whether
or
not
closed
list
is
hidden
.
"""
hideClosedList
:
Boolean
"""
Global
ID
of
the
board
.
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
1a8e7543
...
...
@@ -25849,6 +25849,34 @@
"name": "EpicBoard",
"description": "Represents an epic board",
"fields": [
{
"name": "hideBacklogList",
"description": "Whether or not backlog list is hidden.",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "hideClosedList",
"description": "Whether or not closed list is hidden.",
"args": [
],
"type": {
"kind": "SCALAR",
"name": "Boolean",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "id",
"description": "Global ID of the board.",
doc/api/graphql/reference/index.md
View file @
1a8e7543
...
...
@@ -1539,6 +1539,8 @@ Represents an epic board.
| Field | Type | Description |
| ----- | ---- | ----------- |
|
`hideBacklogList`
| Boolean | Whether or not backlog list is hidden. |
|
`hideClosedList`
| Boolean | Whether or not closed list is hidden. |
|
`id`
| BoardsEpicBoardID! | Global ID of the board. |
|
`lists`
| EpicListConnection | Epic board lists. |
|
`name`
| String | Name of the board. |
...
...
ee/app/graphql/types/boards/epic_board_type.rb
View file @
1a8e7543
...
...
@@ -15,6 +15,13 @@ module Types
field
:name
,
type:
GraphQL
::
STRING_TYPE
,
null:
true
,
description:
'Name of the board.'
field
:hide_backlog_list
,
type:
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Whether or not backlog list is hidden.'
field
:hide_closed_list
,
type:
GraphQL
::
BOOLEAN_TYPE
,
null:
true
,
description:
'Whether or not closed list is hidden.'
field
:lists
,
Types
::
Boards
::
EpicListType
.
connection_type
,
null:
true
,
...
...
ee/spec/graphql/types/boards/epic_board_type_spec.rb
View file @
1a8e7543
...
...
@@ -8,7 +8,7 @@ RSpec.describe GitlabSchema.types['EpicBoard'] do
specify
{
expect
(
described_class
).
to
require_graphql_authorizations
(
:read_epic_board
)
}
it
'has specific fields'
do
expected_fields
=
%w[id name lists]
expected_fields
=
%w[id name lists
hideBacklogList hideClosedList
]
expect
(
described_class
).
to
include_graphql_fields
(
*
expected_fields
)
end
...
...
ee/spec/requests/api/graphql/boards/epic_boards_query_spec.rb
View file @
1a8e7543
...
...
@@ -7,7 +7,7 @@ RSpec.describe 'get list of epic boards' do
let_it_be
(
:current_user
)
{
create
(
:user
)
}
let_it_be
(
:group
)
{
create
(
:group
,
:private
)
}
let_it_be
(
:board1
)
{
create
(
:epic_board
,
group:
group
,
name:
'B'
)
}
let_it_be
(
:board1
)
{
create
(
:epic_board
,
group:
group
,
name:
'B'
,
hide_closed_list:
true
,
hide_backlog_list:
false
)
}
let_it_be
(
:board2
)
{
create
(
:epic_board
,
group:
group
,
name:
'A'
)
}
let_it_be
(
:board3
)
{
create
(
:epic_board
,
group:
group
,
name:
'a'
)
}
...
...
@@ -50,6 +50,26 @@ RSpec.describe 'get list of epic boards' do
end
end
context
'field values'
do
let
(
:query
)
do
graphql_query_for
(
:group
,
{
fullPath:
group
.
full_path
},
query_graphql_field
(
:epicBoard
,
{
id:
board1
.
to_global_id
.
to_s
},
epic_board_fields
))
end
let
(
:epic_board_fields
)
do
<<~
QUERY
hideBacklogList
hideClosedList
QUERY
end
it
'returns the correct values for hiding board lists'
do
post_graphql
(
query
,
current_user:
current_user
)
expect
(
graphql_data
.
dig
(
'group'
,
'epicBoard'
,
'hideBacklogList'
)).
to
eq
board1
.
hide_backlog_list
expect
(
graphql_data
.
dig
(
'group'
,
'epicBoard'
,
'hideClosedList'
)).
to
eq
board1
.
hide_closed_list
end
end
context
'when epic_boards flag is disabled'
do
before
do
stub_feature_flags
(
epic_boards:
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