diff options
-rw-r--r-- | app/models/global_milestone.rb | 4 | ||||
-rw-r--r-- | app/views/groups/milestones/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/milestones/_issue.html.haml | 4 | ||||
-rw-r--r-- | app/views/shared/milestones/_merge_request.html.haml | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/app/models/global_milestone.rb b/app/models/global_milestone.rb index e4dd90b631e..40193a6f050 100644 --- a/app/models/global_milestone.rb +++ b/app/models/global_milestone.rb @@ -76,11 +76,11 @@ class GlobalMilestone end def issues - @issues ||= Issue.of_milestones(milestones.map(&:id)) + @issues ||= Issue.of_milestones(milestones.map(&:id)).includes(:project) end def merge_requests - @merge_requests ||= MergeRequest.of_milestones(milestones.map(&:id)) + @merge_requests ||= MergeRequest.of_milestones(milestones.map(&:id)).includes(:target_project) end def participants diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml index d9899fbd43d..c6016179ba6 100644 --- a/app/views/groups/milestones/show.html.haml +++ b/app/views/groups/milestones/show.html.haml @@ -73,7 +73,7 @@ = render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues .tab-pane#tab-merge-requests - = render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.closed_merge_requests, merged: @milestone.merge_requests.merged + = render 'shared/milestones/merge_requests_tab', unassigned: @milestone.opened_merge_requests.unassigned, assigned: @milestone.opened_merge_requests.assigned, closed: @milestone.merge_requests.closed, merged: @milestone.merge_requests.merged .tab-pane#tab-participants .gray-content-block.middle-block diff --git a/app/views/shared/milestones/_issue.html.haml b/app/views/shared/milestones/_issue.html.haml index 07880404c9a..be55c5b6fe0 100644 --- a/app/views/shared/milestones/_issue.html.haml +++ b/app/views/shared/milestones/_issue.html.haml @@ -1,4 +1,6 @@ -- project = issue.project +-# @project is present when viewing Project's milestone +- project = @project || issue.project + %li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid, 'data-url' => issue_path(issue) } %span = link_to_gfm issue.title, [project.namespace.becomes(Namespace), project, issue], title: issue.title diff --git a/app/views/shared/milestones/_merge_request.html.haml b/app/views/shared/milestones/_merge_request.html.haml index a58dadb4f84..66e2a2955da 100644 --- a/app/views/shared/milestones/_merge_request.html.haml +++ b/app/views/shared/milestones/_merge_request.html.haml @@ -1,3 +1,4 @@ +-# @project is present when viewing Project's milestone - project = @project || merge_request.project %li{ id: dom_id(merge_request, 'sortable'), class: 'mr-row', 'data-iid' => merge_request.iid, 'data-url' => merge_request_path(merge_request) } |