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
eb4ddaf0
Commit
eb4ddaf0
authored
Apr 21, 2020
by
Patrick Derichs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add limit metric to list type
Also update of documentation and schema
parent
fc594fda
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
98 additions
and
0 deletions
+98
-0
doc/api/graphql/reference/gitlab_schema.graphql
doc/api/graphql/reference/gitlab_schema.graphql
+14
-0
doc/api/graphql/reference/gitlab_schema.json
doc/api/graphql/reference/gitlab_schema.json
+43
-0
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+1
-0
ee/app/graphql/ee/types/board_list_type.rb
ee/app/graphql/ee/types/board_list_type.rb
+2
-0
ee/app/graphql/ee/types/list_limit_metric_enum.rb
ee/app/graphql/ee/types/list_limit_metric_enum.rb
+14
-0
ee/changelogs/unreleased/add-limit-metric-to-board-list-type-pd.yml
...ogs/unreleased/add-limit-metric-to-board-list-type-pd.yml
+5
-0
ee/spec/requests/api/graphql/boards/board_lists_query_spec.rb
...pec/requests/api/graphql/boards/board_lists_query_spec.rb
+19
-0
No files found.
doc/api/graphql/reference/gitlab_schema.graphql
View file @
eb4ddaf0
...
@@ -340,6 +340,11 @@ type BoardList {
...
@@ -340,6 +340,11 @@ type BoardList {
"""
"""
label
:
Label
label
:
Label
"""
The
current
limit
metric
for
the
list
"""
limitMetric
:
ListLimitMetric
"""
"""
Type
of
the
list
Type
of
the
list
"""
"""
...
@@ -4619,6 +4624,15 @@ type LabelEdge {
...
@@ -4619,6 +4624,15 @@ type LabelEdge {
node
:
Label
node
:
Label
}
}
"""
List limit metric setting
"""
enum
ListLimitMetric
{
all_metrics
issue_count
issue_weights
}
"""
"""
Autogenerated input type of MarkAsSpamSnippet
Autogenerated input type of MarkAsSpamSnippet
"""
"""
...
...
doc/api/graphql/reference/gitlab_schema.json
View file @
eb4ddaf0
...
@@ -1036,6 +1036,20 @@
...
@@ -1036,6 +1036,20 @@
"isDeprecated"
:
false
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
"deprecationReason"
:
null
},
},
{
"name"
:
"limitMetric"
,
"description"
:
"The current limit metric for the list"
,
"args"
:
[
],
"type"
:
{
"kind"
:
"ENUM"
,
"name"
:
"ListLimitMetric"
,
"ofType"
:
null
},
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
{
"name"
:
"listType"
,
"name"
:
"listType"
,
"description"
:
"Type of the list"
,
"description"
:
"Type of the list"
,
...
@@ -13171,6 +13185,35 @@
...
@@ -13171,6 +13185,35 @@
"enumValues"
:
null
,
"enumValues"
:
null
,
"possibleTypes"
:
null
"possibleTypes"
:
null
},
},
{
"kind"
:
"ENUM"
,
"name"
:
"ListLimitMetric"
,
"description"
:
"List limit metric setting"
,
"fields"
:
null
,
"inputFields"
:
null
,
"interfaces"
:
null
,
"enumValues"
:
[
{
"name"
:
"all_metrics"
,
"description"
:
null
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"issue_count"
,
"description"
:
null
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
},
{
"name"
:
"issue_weights"
,
"description"
:
null
,
"isDeprecated"
:
false
,
"deprecationReason"
:
null
}
],
"possibleTypes"
:
null
},
{
{
"kind"
:
"INPUT_OBJECT"
,
"kind"
:
"INPUT_OBJECT"
,
"name"
:
"MarkAsSpamSnippetInput"
,
"name"
:
"MarkAsSpamSnippetInput"
,
...
...
doc/api/graphql/reference/index.md
View file @
eb4ddaf0
...
@@ -89,6 +89,7 @@ Represents a list for an issue board
...
@@ -89,6 +89,7 @@ Represents a list for an issue board
|
`collapsed`
| Boolean | Indicates if list is collapsed for this user |
|
`collapsed`
| Boolean | Indicates if list is collapsed for this user |
|
`id`
| ID! | ID (global ID) of the list |
|
`id`
| ID! | ID (global ID) of the list |
|
`label`
| Label | Label of the list |
|
`label`
| Label | Label of the list |
|
`limitMetric`
| ListLimitMetric | The current limit metric for the list |
|
`listType`
| String! | Type of the list |
|
`listType`
| String! | Type of the list |
|
`maxIssueCount`
| Int | Maximum number of issues in the list |
|
`maxIssueCount`
| Int | Maximum number of issues in the list |
|
`maxIssueWeight`
| Int | Maximum weight of issues in the list |
|
`maxIssueWeight`
| Int | Maximum weight of issues in the list |
...
...
ee/app/graphql/ee/types/board_list_type.rb
View file @
eb4ddaf0
...
@@ -14,6 +14,8 @@ module EE
...
@@ -14,6 +14,8 @@ module EE
description:
'Maximum weight of issues in the list'
description:
'Maximum weight of issues in the list'
field
:assignee
,
::
Types
::
UserType
,
null:
true
,
field
:assignee
,
::
Types
::
UserType
,
null:
true
,
description:
'Assignee in the list'
description:
'Assignee in the list'
field
:limit_metric
,
::
EE
::
Types
::
ListLimitMetricEnum
,
null:
true
,
description:
'The current limit metric for the list'
def
milestone
def
milestone
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
Milestone
,
object
.
milestone_id
).
find
::
Gitlab
::
Graphql
::
Loaders
::
BatchModelLoader
.
new
(
::
Milestone
,
object
.
milestone_id
).
find
...
...
ee/app/graphql/ee/types/list_limit_metric_enum.rb
0 → 100644
View file @
eb4ddaf0
# frozen_string_literal: true
module
EE
module
Types
class
ListLimitMetricEnum
<
::
Types
::
BaseEnum
graphql_name
'ListLimitMetric'
description
'List limit metric setting'
value
'all_metrics'
value
'issue_count'
value
'issue_weights'
end
end
end
ee/changelogs/unreleased/add-limit-metric-to-board-list-type-pd.yml
0 → 100644
View file @
eb4ddaf0
---
title
:
Add limit metric to list type
merge_request
:
30028
author
:
type
:
added
ee/spec/requests/api/graphql/boards/board_lists_query_spec.rb
View file @
eb4ddaf0
...
@@ -102,6 +102,25 @@ describe 'get board lists' do
...
@@ -102,6 +102,25 @@ describe 'get board lists' do
end
end
end
end
end
end
describe
'limit metric settings'
do
let
(
:limit_metric_params
)
{
{
limit_metric:
'issue_count'
,
max_issue_count:
10
,
max_issue_weight:
4
}
}
let!
(
:list_with_limit_metrics
)
{
create
(
:list
,
board:
board
,
**
limit_metric_params
)
}
before
do
post_graphql
(
query
,
current_user:
user
)
end
it
'returns the expected limit metric settings'
do
lists
=
grab_list_data
(
response
.
body
).
map
{
|
item
|
item
[
'node'
]
}
list
=
lists
.
find
{
|
l
|
l
[
'id'
]
==
list_with_limit_metrics
.
to_global_id
.
to_s
}
expect
(
list
[
'limitMetric'
]).
to
eq
(
'issue_count'
)
expect
(
list
[
'maxIssueCount'
]).
to
eq
(
10
)
expect
(
list
[
'maxIssueWeight'
]).
to
eq
(
4
)
end
end
end
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