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
072bcf11
Commit
072bcf11
authored
Mar 16, 2020
by
Patrick Derichs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add list limit metric to API
Also update specs and documentation.
parent
f0af9f07
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
16 deletions
+46
-16
doc/api/boards.md
doc/api/boards.md
+30
-15
ee/changelogs/unreleased/add-list-limit-metric-to-api.yml
ee/changelogs/unreleased/add-list-limit-metric-to-api.yml
+5
-0
ee/lib/ee/api/entities/list.rb
ee/lib/ee/api/entities/list.rb
+1
-0
ee/spec/requests/api/boards_spec.rb
ee/spec/requests/api/boards_spec.rb
+8
-0
spec/fixtures/api/schemas/public_api/v4/board.json
spec/fixtures/api/schemas/public_api/v4/board.json
+2
-1
No files found.
doc/api/boards.md
View file @
072bcf11
...
...
@@ -56,7 +56,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
2
,
...
...
@@ -67,7 +68,8 @@ Example response:
},
"position"
:
2
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
3
,
...
...
@@ -78,7 +80,8 @@ Example response:
},
"position"
:
3
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
]
}
...
...
@@ -131,7 +134,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
2
,
...
...
@@ -142,7 +146,8 @@ Example response:
},
"position"
:
2
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
3
,
...
...
@@ -153,7 +158,8 @@ Example response:
},
"position"
:
3
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
]
}
...
...
@@ -205,7 +211,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
2
,
...
...
@@ -216,7 +223,8 @@ Example response:
},
"position"
:
2
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
3
,
...
...
@@ -227,7 +235,8 @@ Example response:
},
"position"
:
3
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
]
}
...
...
@@ -362,7 +371,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
2
,
...
...
@@ -373,7 +383,8 @@ Example response:
},
"position"
:
2
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
},
{
"id"
:
3
,
...
...
@@ -384,7 +395,8 @@ Example response:
},
"position"
:
3
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
]
```
...
...
@@ -419,7 +431,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
```
...
...
@@ -461,7 +474,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
```
...
...
@@ -496,7 +510,8 @@ Example response:
},
"position"
:
1
,
"max_issue_count"
:
0
,
"max_issue_weight"
:
0
"max_issue_weight"
:
0
,
"limit_metric"
:
null
}
```
...
...
ee/changelogs/unreleased/add-list-limit-metric-to-api.yml
0 → 100644
View file @
072bcf11
---
title
:
Add list limit metric to API
merge_request
:
27324
author
:
type
:
added
ee/lib/ee/api/entities/list.rb
View file @
072bcf11
...
...
@@ -11,6 +11,7 @@ module EE
expose
:user
,
as: :assignee
,
using:
::
API
::
Entities
::
UserSafe
,
if:
->
(
entity
,
_
)
{
entity
.
assignee?
}
expose
:max_issue_count
,
if:
->
(
list
,
_
)
{
list
.
wip_limits_available?
}
expose
:max_issue_weight
,
if:
->
(
list
,
_
)
{
list
.
wip_limits_available?
}
expose
:limit_metric
,
if:
->
(
list
,
_
)
{
list
.
wip_limits_available?
}
end
end
end
...
...
ee/spec/requests/api/boards_spec.rb
View file @
072bcf11
...
...
@@ -54,6 +54,10 @@ RSpec.describe API::Boards do
it
'includes max_issue_weight'
do
all_lists_in_response
(
include:
'max_issue_weight'
)
end
it
'includes limit_metric'
do
all_lists_in_response
(
include:
'limit_metric'
)
end
end
context
'without WIP limits license'
do
...
...
@@ -70,6 +74,10 @@ RSpec.describe API::Boards do
it
'does not include max_issue_count'
do
all_lists_in_response
(
do_not_include:
'max_issue_count'
)
end
it
'does not include limit_metric'
do
all_lists_in_response
(
do_not_include:
'limit_metric'
)
end
end
def
all_lists_in_response
(
params
)
...
...
spec/fixtures/api/schemas/public_api/v4/board.json
View file @
072bcf11
...
...
@@ -78,7 +78,8 @@
},
"position"
:
{
"type"
:
[
"integer"
,
"null"
]
},
"max_issue_count"
:
{
"type"
:
"integer"
},
"max_issue_weight"
:
{
"type"
:
"integer"
}
"max_issue_weight"
:
{
"type"
:
"integer"
},
"limit_metric"
:
{
"type"
:
[
"string"
,
"null"
]
}
},
"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