Merge branch 'milestone-avatar-issuable-link' into 'master'
Fixes milestone issuable assignee URL Closes #33124 See merge request gitlab-org/gitlab-ce!14292
This commit is contained in:
commit
4197cd8c83
3 changed files with 25 additions and 1 deletions
|
@ -26,6 +26,6 @@
|
|||
|
||||
%span.assignee-icon
|
||||
- assignees.each do |assignee|
|
||||
= link_to polymorphic_path(base_url_args, { milestone_title: @milestone.title, assignee_id: assignee.id, state: 'all' }),
|
||||
= link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, assignee_id: assignee.id, state: 'all' }),
|
||||
class: 'has-tooltip', title: "Assigned to #{assignee.name}", data: { container: 'body' } do
|
||||
- image_tag(avatar_icon(assignee, 16), class: "avatar s16", alt: '')
|
||||
|
|
5
changelogs/unreleased/milestone-avatar-issuable-link.yml
Normal file
5
changelogs/unreleased/milestone-avatar-issuable-link.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fixed milestone issuable assignee link URL
|
||||
merge_request:
|
||||
author:
|
||||
type: fixed
|
19
spec/views/shared/milestones/_issuable.html.haml.rb
Normal file
19
spec/views/shared/milestones/_issuable.html.haml.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'shared/milestones/_issuable.html.haml' do
|
||||
let(:project) { create(:project) }
|
||||
let(:user) { create(:user) }
|
||||
let(:milestone) { create(:milestone, project: project) }
|
||||
let(:issuable) { create(:issue, project: project, assignees: [user]) }
|
||||
|
||||
before do
|
||||
assign(:project, project)
|
||||
assign(:milestone, milestone)
|
||||
end
|
||||
|
||||
it 'avatar links to issues page' do
|
||||
render 'shared/milestones/issuable', issuable: issuable, show_project_name: true
|
||||
|
||||
expect(rendered).to have_css("a[href='#{project_issues_path(project, milestone_title: milestone.title, assignee_id: user.id, state: 'all')}']")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue