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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
b0859a52
Commit
b0859a52
authored
Apr 20, 2018
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Backport] Burndown chart for group milestone
parent
54b97f9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
app/helpers/gitlab_routing_helper.rb
app/helpers/gitlab_routing_helper.rb
+8
-0
spec/helpers/gitlab_routing_helper_spec.rb
spec/helpers/gitlab_routing_helper_spec.rb
+15
-0
No files found.
app/helpers/gitlab_routing_helper.rb
View file @
b0859a52
...
...
@@ -81,6 +81,14 @@ module GitlabRoutingHelper
end
end
def
edit_milestone_path
(
entity
,
*
args
)
if
entity
.
parent
.
is_a?
(
Group
)
edit_group_milestone_path
(
entity
.
parent
,
entity
,
*
args
)
else
edit_project_milestone_path
(
entity
.
parent
,
entity
,
*
args
)
end
end
def
toggle_subscription_path
(
entity
,
*
args
)
if
entity
.
is_a?
(
Issue
)
toggle_subscription_project_issue_path
(
entity
.
project
,
entity
)
...
...
spec/helpers/gitlab_routing_helper_spec.rb
View file @
b0859a52
...
...
@@ -89,4 +89,19 @@ describe GitlabRoutingHelper do
expect
(
preview_markdown_path
(
project
)).
to
eq
(
"/
#{
project
.
full_path
}
/preview_markdown"
)
end
end
describe
'#edit_milestone_path'
do
it
'returns group milestone edit path when given entity parent is a Group'
do
group
=
create
(
:group
)
milestone
=
create
(
:milestone
,
group:
group
)
expect
(
edit_milestone_path
(
milestone
)).
to
eq
(
"/groups/
#{
group
.
path
}
/-/milestones/
#{
milestone
.
iid
}
/edit"
)
end
it
'returns project milestone edit path when given entity parent is not a Group'
do
milestone
=
create
(
:milestone
,
group:
nil
)
expect
(
edit_milestone_path
(
milestone
)).
to
eq
(
"/
#{
milestone
.
project
.
full_path
}
/milestones/
#{
milestone
.
iid
}
/edit"
)
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