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
80e147a7
Commit
80e147a7
authored
Oct 01, 2019
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue_11239' into 'master'
Expose epics closed_at on API See merge request gitlab-org/gitlab!17156
parents
b8a9da74
3d19c9d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
1 deletion
+22
-1
doc/api/epics.md
doc/api/epics.md
+6
-1
ee/changelogs/unreleased/issue_11239.yml
ee/changelogs/unreleased/issue_11239.yml
+5
-0
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+1
-0
ee/spec/fixtures/api/schemas/public_api/v4/epic.json
ee/spec/fixtures/api/schemas/public_api/v4/epic.json
+1
-0
ee/spec/requests/api/epics_spec.rb
ee/spec/requests/api/epics_spec.rb
+9
-0
No files found.
doc/api/epics.md
View file @
80e147a7
...
...
@@ -88,6 +88,7 @@ Example response:
"due_date_from_milestones"
:
"2018-07-31"
,
"created_at"
:
"2018-07-17T13:36:22.770Z"
,
"updated_at"
:
"2018-07-18T12:22:05.239Z"
,
"closed_at"
:
"2018-08-18T12:22:05.239Z"
,
"labels"
:
[],
"upvotes"
:
4
,
"downvotes"
:
0
...
...
@@ -143,6 +144,7 @@ Example response:
"due_date_from_milestones"
:
"2018-07-31"
,
"created_at"
:
"2018-07-17T13:36:22.770Z"
,
"updated_at"
:
"2018-07-18T12:22:05.239Z"
,
"closed_at"
:
"2018-08-18T12:22:05.239Z"
,
"labels"
:
[],
"upvotes"
:
4
,
"downvotes"
:
0
...
...
@@ -209,6 +211,7 @@ Example response:
"due_date_from_milestones"
:
"2018-07-31"
,
"created_at"
:
"2018-07-17T13:36:22.770Z"
,
"updated_at"
:
"2018-07-18T12:22:05.239Z"
,
"closed_at"
:
"2018-08-18T12:22:05.239Z"
,
"labels"
:
[],
"upvotes"
:
4
,
"downvotes"
:
0
...
...
@@ -276,6 +279,7 @@ Example response:
"due_date_from_milestones"
:
"2018-07-31"
,
"created_at"
:
"2018-07-17T13:36:22.770Z"
,
"updated_at"
:
"2018-07-18T12:22:05.239Z"
,
"closed_at"
:
"2018-08-18T12:22:05.239Z"
,
"labels"
:
[],
"upvotes"
:
4
,
"downvotes"
:
0
...
...
@@ -358,7 +362,8 @@ Example response:
"start_date"
:
null
,
"end_date"
:
null
,
"created_at"
:
"2018-01-21T06:21:13.165Z"
,
"updated_at"
:
"2018-01-22T12:41:41.166Z"
"updated_at"
:
"2018-01-22T12:41:41.166Z"
,
"closed_at"
:
"2018-08-18T12:22:05.239Z"
},
"target_url"
:
"https://gitlab.example.com/groups/epics/5"
,
"body"
:
"Vel voluptas atque dicta mollitia adipisci qui at."
,
...
...
ee/changelogs/unreleased/issue_11239.yml
0 → 100644
View file @
80e147a7
---
title
:
Expose epics closed_at on API
merge_request
:
17156
author
:
type
:
changed
ee/lib/ee/api/entities.rb
View file @
80e147a7
...
...
@@ -301,6 +301,7 @@ module EE
end
expose
:created_at
expose
:updated_at
expose
:closed_at
expose
:labels
do
|
epic
|
# Avoids an N+1 query since labels are preloaded
epic
.
labels
.
map
(
&
:title
).
sort
...
...
ee/spec/fixtures/api/schemas/public_api/v4/epic.json
View file @
80e147a7
...
...
@@ -39,6 +39,7 @@
"state"
:
{
"type"
:
"string"
},
"created_at"
:
{
"type"
:
[
"string"
,
"null"
]
},
"updated_at"
:
{
"type"
:
[
"string"
,
"null"
]
},
"closed_at"
:
{
"type"
:
[
"string"
,
"null"
]
},
"web_edit_url"
:
{
"type"
:
"string"
},
"web_url"
:
{
"type"
:
"string"
},
"reference"
:
{
"type"
:
"string"
}
...
...
ee/spec/requests/api/epics_spec.rb
View file @
80e147a7
...
...
@@ -422,6 +422,15 @@ describe API::Epics do
expect
(
response
).
to
match_response_schema
(
'public_api/v4/epic'
,
dir:
'ee'
)
end
it
'exposes closed_at attribute'
do
epic
.
close
get
api
(
url
)
expect
(
response
).
to
match_response_schema
(
'public_api/v4/epic'
,
dir:
'ee'
)
expect
(
json_response
[
'closed_at'
]).
to
be_present
end
it_behaves_like
'can admin epics'
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