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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1a2d9645
Commit
1a2d9645
authored
Oct 19, 2021
by
Jeremy Wu
Committed by
Ezekiel Kigbo
Oct 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix external issues sidebar avatar sub-label error
parent
fa16b84a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
33 additions
and
13 deletions
+33
-13
ee/app/assets/javascripts/external_issues_show/components/sidebar/assignee.vue
...ipts/external_issues_show/components/sidebar/assignee.vue
+6
-1
ee/app/assets/javascripts/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root.vue
...sues_show/components/sidebar/jira_issues_sidebar_root.vue
+2
-1
ee/app/assets/javascripts/integrations/zentao/issues_show/components/sidebar/zentao_issues_sidebar_root.vue
...es_show/components/sidebar/zentao_issues_sidebar_root.vue
+2
-1
ee/spec/frontend/external_issues_show/components/sidebar/__snapshots__/assignee_spec.js.snap
...ow/components/sidebar/__snapshots__/assignee_spec.js.snap
+0
-1
ee/spec/frontend/external_issues_show/components/sidebar/assignee_spec.js
.../external_issues_show/components/sidebar/assignee_spec.js
+18
-9
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
..._show/components/sidebar/jira_issues_sidebar_root_spec.js
+1
-0
ee/spec/frontend/integrations/zentao/issues_show/components/sidebar/zentao_issues_sidebar_root_spec.js
...how/components/sidebar/zentao_issues_sidebar_root_spec.js
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
ee/app/assets/javascripts/external_issues_show/components/sidebar/assignee.vue
View file @
1a2d9645
...
...
@@ -21,6 +21,11 @@ export default {
required
:
false
,
default
:
null
,
},
avatarSubLabel
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
computed
:
{
tooltipTitle
()
{
...
...
@@ -60,7 +65,7 @@ export default {
:alt=
"assignee.name"
:entity-name=
"assignee.name"
:label=
"assignee.name"
:sub-label=
"
__('Jira user')
"
:sub-label=
"
avatarSubLabel
"
/>
</gl-avatar-link>
<span
v-else
class=
"gl-text-gray-500"
data-testid=
"no-assignee-text"
>
{{
__
(
'
None
'
)
}}
</span>
...
...
ee/app/assets/javascripts/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root.vue
View file @
1a2d9645
...
...
@@ -83,6 +83,7 @@ export default {
statusDropdownEmpty
:
s__
(
'
JiraService|No available statuses
'
),
statusDropdownTitle
:
__
(
'
Change status
'
),
referenceName
:
__
(
'
Reference
'
),
avatarSubLabel
:
__
(
'
Jira user
'
),
},
mounted
()
{
this
.
sidebarEl
=
document
.
querySelector
(
'
aside.right-sidebar
'
);
...
...
@@ -131,7 +132,7 @@ export default {
<
template
>
<div>
<assignee
class=
"block"
:assignee=
"assignee"
/>
<assignee
class=
"block"
:assignee=
"assignee"
:avatar-sub-label=
"$options.i18n.avatarSubLabel"
/>
<issue-due-date
:due-date=
"issue.dueDate"
/>
<issue-field
icon=
"progress"
...
...
ee/app/assets/javascripts/integrations/zentao/issues_show/components/sidebar/zentao_issues_sidebar_root.vue
View file @
1a2d9645
...
...
@@ -31,13 +31,14 @@ export default {
i18n
:
{
statusTitle
:
__
(
'
Status
'
),
referenceName
:
__
(
'
Reference
'
),
avatarSubLabel
:
__
(
'
Zentao user
'
),
},
};
</
script
>
<
template
>
<div>
<assignee
class=
"block"
:assignee=
"assignee"
/>
<assignee
class=
"block"
:assignee=
"assignee"
:avatar-sub-label=
"$options.i18n.avatarSubLabel"
/>
<issue-due-date
:due-date=
"issue.dueDate"
/>
<issue-field
icon=
"progress"
:title=
"$options.i18n.statusTitle"
:value=
"issue.status"
/>
<labels-select
...
...
ee/spec/frontend/external_issues_show/components/sidebar/__snapshots__/assignee_spec.js.snap
View file @
1a2d9645
...
...
@@ -21,7 +21,6 @@ exports[`ExternalIssuesSidebarAssignee with assignee template renders avatar com
labellink=""
size="32"
src="http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png?width=90"
sublabel="Jira user"
sublabellink=""
/>
</gl-avatar-link-stub>
...
...
ee/spec/frontend/external_issues_show/components/sidebar/assignee_spec.js
View file @
1a2d9645
...
...
@@ -14,27 +14,24 @@ describe('ExternalIssuesSidebarAssignee', () => {
const
findNoAssigneeText
=
()
=>
wrapper
.
findByTestId
(
'
no-assignee-text
'
);
const
findNoAssigneeIcon
=
()
=>
wrapper
.
findByTestId
(
'
no-assignee-text
'
);
const
findAvatar
=
()
=>
wrapper
.
find
(
GlAvatar
);
const
findAvatarLabeled
=
()
=>
wrapper
.
find
(
GlAvatarLabeled
);
const
findAvatarLink
=
()
=>
wrapper
.
find
(
GlAvatarLink
);
const
findAvatar
=
()
=>
wrapper
.
find
Component
(
GlAvatar
);
const
findAvatarLabeled
=
()
=>
wrapper
.
find
Component
(
GlAvatarLabeled
);
const
findAvatarLink
=
()
=>
wrapper
.
find
Component
(
GlAvatarLink
);
const
findSidebarCollapsedIconWrapper
=
()
=>
wrapper
.
findByTestId
(
'
sidebar-collapsed-icon-wrapper
'
);
const
createComponent
=
(
{
assignee
}
=
{}
)
=>
{
const
createComponent
=
(
props
)
=>
{
wrapper
=
extendedWrapper
(
shallowMount
(
Assignee
,
{
propsData
:
{
assignee
,
...
props
,
},
}),
);
};
afterEach
(()
=>
{
if
(
wrapper
)
{
wrapper
.
destroy
();
wrapper
=
null
;
}
wrapper
.
destroy
();
});
describe
(
'
with assignee
'
,
()
=>
{
...
...
@@ -102,6 +99,18 @@ describe('ExternalIssuesSidebarAssignee', () => {
});
});
describe
(
'
with assignee and avatarSubLabel
'
,
()
=>
{
it
(
'
renders avatar with sub-label
'
,
()
=>
{
const
mockSubLabel
=
'
Another Sub Label
'
;
createComponent
({
assignee
:
mockAssignee
,
avatarSubLabel
:
mockSubLabel
,
});
expect
(
findAvatarLabeled
().
props
(
'
subLabel
'
)).
toBe
(
mockSubLabel
);
});
});
describe
(
'
with no assignee
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
assignee
:
undefined
});
...
...
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
View file @
1a2d9645
...
...
@@ -46,6 +46,7 @@ describe('JiraIssuesSidebar', () => {
const
assignee
=
findAssignee
();
expect
(
assignee
.
props
(
'
assignee
'
)).
toBe
(
mockJiraIssue
.
assignees
[
0
]);
expect
(
assignee
.
props
(
'
avatarSubLabel
'
)).
toBe
(
'
Jira user
'
);
});
it
(
'
renders IssueDueDate
'
,
()
=>
{
...
...
ee/spec/frontend/integrations/zentao/issues_show/components/sidebar/zentao_issues_sidebar_root_spec.js
View file @
1a2d9645
...
...
@@ -44,6 +44,7 @@ describe('ZentaoIssuesSidebar', () => {
const
assignee
=
findAssignee
();
expect
(
assignee
.
props
(
'
assignee
'
)).
toBe
(
mockZentaoIssue
.
assignees
[
0
]);
expect
(
assignee
.
props
(
'
avatarSubLabel
'
)).
toBe
(
'
Zentao user
'
);
});
it
(
'
renders IssueDueDate
'
,
()
=>
{
...
...
locale/gitlab.pot
View file @
1a2d9645
...
...
@@ -39681,6 +39681,9 @@ msgstr ""
msgid "Zentao issues"
msgstr ""
msgid "Zentao user"
msgstr ""
msgid "ZentaoIntegration|An error occurred while requesting data from the ZenTao service."
msgstr ""
...
...
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