Commit f5389328 authored by Clement Ho's avatar Clement Ho

Merge branch 'fix_assignee_url_issue_board_sidebar' into 'master'

Fix assignee url issue in board sidebar

Closes #35842

See merge request gitlab-org/gitlab!20992
parents 6373ddb6 674de354
......@@ -166,6 +166,7 @@ export default () => {
humanTotalTimeSpent,
weight,
epic,
assignees,
} = convertObjectPropsToCamelCase(data);
newIssue.setFetchingState('subscriptions', false);
......@@ -179,6 +180,7 @@ export default () => {
subscribed,
weight,
epic,
assignees,
});
})
.catch(() => {
......
<script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import { joinPaths } from '~/lib/utils/url_utility';
import AssigneeAvatar from './assignee_avatar.vue';
export default {
......@@ -60,7 +59,7 @@ export default {
};
},
assigneeUrl() {
return joinPaths(`${this.rootPath}`, `${this.user.username}`);
return this.user.web_url;
},
},
};
......
---
title: Fix assignee url in issue board sidebar
merge_request: 20992
author: Lee Tickett
type: fixed
import { shallowMount } from '@vue/test-utils';
import { TEST_HOST } from 'helpers/test_constants';
import { joinPaths } from '~/lib/utils/url_utility';
import AssigneeAvatarLink from '~/sidebar/components/assignees/assignee_avatar_link.vue';
import AssigneeAvatar from '~/sidebar/components/assignees/assignee_avatar.vue';
import userDataMock from '../../user_data_mock';
const TOOLTIP_PLACEMENT = 'bottom';
const { name: USER_NAME, username: USER_USERNAME } = userDataMock();
const { name: USER_NAME } = userDataMock();
const TEST_ISSUABLE_TYPE = 'merge_request';
describe('AssigneeAvatarLink component', () => {
......@@ -38,9 +37,8 @@ describe('AssigneeAvatarLink component', () => {
it('has the root url present in the assigneeUrl method', () => {
createComponent();
const assigneeUrl = joinPaths(TEST_HOST, USER_USERNAME);
expect(wrapper.attributes().href).toEqual(assigneeUrl);
expect(wrapper.attributes().href).toEqual(userDataMock().web_url);
});
it('renders assignee avatar', () => {
......
import { TEST_HOST } from 'helpers/test_constants';
export default () => ({
avatar_url: 'mock_path',
avatar_url: `${TEST_HOST}/avatar/root.png`,
id: 1,
name: 'Root',
state: 'active',
username: 'root',
web_url: '',
web_url: `${TEST_HOST}/root`,
can_merge: true,
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment