diff options
author | Sean McGivern <sean@gitlab.com> | 2017-07-31 19:33:57 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-07-31 21:06:16 +0300 |
commit | 15911ef32792b19daf192a0123a8a44ff393eb02 (patch) | |
tree | 01964b63d9dbc390b601be9a4063548de42869cc /app/helpers | |
parent | a9f56ae16873af40c7f1f753aee4528f0fbc2e8d (diff) |
Fix group milestone path on issuable sidebar
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/gitlab_routing_helper.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb index 0517a699ae0..1f7db9b2eb8 100644 --- a/app/helpers/gitlab_routing_helper.rb +++ b/app/helpers/gitlab_routing_helper.rb @@ -48,7 +48,11 @@ module GitlabRoutingHelper end def milestone_path(entity, *args) - project_milestone_path(entity.project, entity, *args) + if entity.is_group_milestone? + group_milestone_path(entity.group, entity, *args) + elsif entity.is_project_milestone? + project_milestone_path(entity.project, entity, *args) + end end def issue_url(entity, *args) @@ -63,6 +67,14 @@ module GitlabRoutingHelper project_pipeline_url(pipeline.project, pipeline.id, *args) end + def milestone_url(entity, *args) + if entity.is_group_milestone? + group_milestone_url(entity.group, entity, *args) + elsif entity.is_project_milestone? + project_milestone_url(entity.project, entity, *args) + end + end + def pipeline_job_url(pipeline, build, *args) project_job_url(pipeline.project, build.id, *args) end |