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
2d51f7b9
Commit
2d51f7b9
authored
Jun 12, 2019
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calculation of epic ancestor links
parent
3913731f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
ee/app/presenters/epic_presenter.rb
ee/app/presenters/epic_presenter.rb
+1
-1
ee/changelogs/unreleased/12101-epic-ancestor-links-link-to-self-vs-ancestor-epic.yml
...101-epic-ancestor-links-link-to-self-vs-ancestor-epic.yml
+5
-0
ee/spec/presenters/epic_presenter_spec.rb
ee/spec/presenters/epic_presenter_spec.rb
+7
-0
No files found.
ee/app/presenters/epic_presenter.rb
View file @
2d51f7b9
...
...
@@ -133,7 +133,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
{
id:
epic
.
id
,
title:
epic
.
title
,
url:
group_epic_path
,
url:
url_builder
.
epic_path
(
epic
)
,
state:
epic
.
state
,
human_readable_end_date:
epic
.
end_date
&
.
to_s
(
:medium
),
human_readable_timestamp:
remaining_days_in_words
(
epic
.
end_date
,
epic
.
start_date
)
...
...
ee/changelogs/unreleased/12101-epic-ancestor-links-link-to-self-vs-ancestor-epic.yml
0 → 100644
View file @
2d51f7b9
---
title
:
Fix incorrect epic ancestor links
merge_request
:
14092
author
:
type
:
fixed
ee/spec/presenters/epic_presenter_spec.rb
View file @
2d51f7b9
...
...
@@ -29,6 +29,13 @@ describe EpicPresenter do
expect
(
presenter
.
show_data
.
keys
).
to
match_array
([
:initial
,
:meta
])
end
it
'has correct ancestors'
do
metadata
=
JSON
.
parse
(
presenter
.
show_data
[
:meta
])
ancestor_url
=
metadata
[
'ancestors'
].
first
[
'url'
]
expect
(
ancestor_url
).
to
eq
"/groups/
#{
parent_epic
.
group
.
full_path
}
/-/epics/
#{
parent_epic
.
iid
}
"
end
it
'returns the correct json schema for epic initial data'
do
data
=
presenter
.
show_data
(
author_icon:
'icon_path'
)
...
...
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