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
a3353c25
Commit
a3353c25
authored
Aug 02, 2019
by
Mario de la Ossa
Committed by
Kushal Pandya
Aug 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add iid, epic_issue_id & group_id to sidebar
Expose `iid`, `epic_issue_id` & `group_id` for Issuable sidebar
parent
e367aafd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
11 deletions
+33
-11
doc/api/epics.md
doc/api/epics.md
+8
-0
ee/app/serializers/ee/issue_sidebar_extras_entity.rb
ee/app/serializers/ee/issue_sidebar_extras_entity.rb
+6
-1
ee/app/serializers/epic_base_entity.rb
ee/app/serializers/epic_base_entity.rb
+2
-0
ee/app/views/shared/issuable/_sidebar_item_epic.haml
ee/app/views/shared/issuable/_sidebar_item_epic.haml
+9
-5
ee/lib/ee/api/entities.rb
ee/lib/ee/api/entities.rb
+6
-4
ee/spec/fixtures/api/schemas/entities/issue_sidebar_extras.json
...c/fixtures/api/schemas/entities/issue_sidebar_extras.json
+2
-1
No files found.
doc/api/epics.md
View file @
a3353c25
...
...
@@ -65,6 +65,8 @@ Example response:
"title"
:
"Accusamus iste et ullam ratione voluptatem omnis debitis dolor est."
,
"description"
:
"Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum."
,
"state"
:
"opened"
,
"web_edit_url"
:
"http://localhost:3001/groups/test/-/epics/4"
,
"reference"
:
"&4"
,
"author"
:
{
"id"
:
10
,
"name"
:
"Lu Mayer"
,
...
...
@@ -118,6 +120,8 @@ Example response:
"title"
:
"Ea cupiditate dolores ut vero consequatur quasi veniam voluptatem et non."
,
"description"
:
"Molestias dolorem eos vitae expedita impedit necessitatibus quo voluptatum."
,
"state"
:
"opened"
,
"web_edit_url"
:
"http://localhost:3001/groups/test/-/epics/5"
,
"reference"
:
"&5"
,
"author"
:{
"id"
:
7
,
"name"
:
"Pamella Huel"
,
...
...
@@ -182,6 +186,8 @@ Example response:
"title"
:
"Epic"
,
"description"
:
"Epic description"
,
"state"
:
"opened"
,
"web_edit_url"
:
"http://localhost:3001/groups/test/-/epics/6"
,
"reference"
:
"&6"
,
"author"
:
{
"name"
:
"Alexandra Bashirian"
,
"avatar_url"
:
null
,
...
...
@@ -247,6 +253,8 @@ Example response:
"title"
:
"New Title"
,
"description"
:
"Epic description"
,
"state"
:
"opened"
,
"web_edit_url"
:
"http://localhost:3001/groups/test/-/epics/6"
,
"reference"
:
"&6"
,
"author"
:
{
"name"
:
"Alexandra Bashirian"
,
"avatar_url"
:
null
,
...
...
ee/app/serializers/ee/issue_sidebar_extras_entity.rb
View file @
a3353c25
...
...
@@ -5,7 +5,12 @@ module EE
extend
ActiveSupport
::
Concern
prepended
do
expose
:epic
,
using:
EpicBaseEntity
expose
:epic
do
expose
:epic
,
merge:
true
,
using:
EpicBaseEntity
expose
:epic_issue_id
do
|
issuable
|
issuable
.
epic_issue
&
.
id
end
end
expose
:weight
end
end
...
...
ee/app/serializers/epic_base_entity.rb
View file @
a3353c25
...
...
@@ -5,10 +5,12 @@ class EpicBaseEntity < Grape::Entity
include
EntityDateHelper
expose
:id
expose
:iid
expose
:title
expose
:url
do
|
epic
|
group_epic_path
(
epic
.
group
,
epic
)
end
expose
:group_id
expose
:human_readable_end_date
,
if:
->
(
epic
,
_
)
{
epic
.
end_date
.
present?
}
do
|
epic
|
epic
.
end_date
&
.
to_s
(
:medium
)
end
...
...
ee/app/views/shared/issuable/_sidebar_item_epic.haml
View file @
a3353c25
-
if
issuable_sidebar
[
:supports_epic
]
-
if
issuable_sidebar
[
:features_available
][
:epics
]
.block.epic
#js-vue-sidebar-item-epic
.title.hide-collapsed
Epic
=
icon
(
'spinner spin'
)
-
if
cookies
[
:epics_select_dropdown
]
==
'true'
#js-vue-sidebar-item-epics-select
{
data:
{
can_edit:
can_admin_issue?
.
to_s
,
group_id:
@project
.
group
.
id
,
issue_id:
@issuable
.
id
,
epic_issue_id:
@issuable
.
epic_issue
&
.
id
}
}
-
else
.block.epic
#js-vue-sidebar-item-epic
.title.hide-collapsed
Epic
=
icon
(
'spinner spin'
)
-
else
=
render
'shared/promotions/promote_epics'
ee/lib/ee/api/entities.rb
View file @
a3353c25
...
...
@@ -260,11 +260,11 @@ module EE
expose
:due_date_is_fixed?
,
as: :due_date_is_fixed
,
if:
can_admin_epic
expose
:due_date_fixed
,
:due_date_from_milestones
,
if:
can_admin_epic
expose
:state
expose
:web_edit_url
do
|
epic
|
expose
:web_edit_url
,
if:
can_admin_epic
do
|
epic
|
::
Gitlab
::
Routing
.
url_helpers
.
group_epic_path
(
epic
.
group
,
epic
)
end
expose
:reference
do
|
epic
|
epic
.
to_reference
(
epic
.
parent
&
.
group
)
expose
:reference
,
if:
{
with_reference:
true
}
do
|
epic
|
epic
.
to_reference
(
full:
true
)
end
expose
:created_at
expose
:updated_at
...
...
@@ -298,7 +298,9 @@ module EE
class
EpicIssueLink
<
Grape
::
Entity
expose
:id
expose
:relative_position
expose
:epic
,
using:
EE
::
API
::
Entities
::
Epic
expose
:epic
do
|
epic_issue_link
,
_options
|
::
EE
::
API
::
Entities
::
Epic
.
represent
(
epic_issue_link
.
epic
,
with_reference:
true
)
end
expose
:issue
,
using:
::
API
::
Entities
::
IssueBasic
end
...
...
ee/spec/fixtures/api/schemas/entities/issue_sidebar_extras.json
View file @
a3353c25
...
...
@@ -8,7 +8,8 @@
"properties"
:
{
"id"
:
{
"type"
:
"integer"
},
"title"
:
{
"type"
:
"string"
},
"url"
:
{
"type"
:
"string"
}
"url"
:
{
"type"
:
"string"
},
"epic_issue_id"
:
{
"type"
:
[
"integer"
,
"null"
]
}
}
},
"weight"
:
{
"type"
:
[
"integer"
,
"null"
]
}
...
...
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