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
23f8597e
Commit
23f8597e
authored
Sep 30, 2021
by
Jeremy Wu
Committed by
Ezekiel Kigbo
Sep 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature ZenTao integration: Extract Issue Detail Part
parent
cbc1b00b
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
90 additions
and
27 deletions
+90
-27
ee/app/assets/javascripts/external_issues_show/components/note.vue
...sets/javascripts/external_issues_show/components/note.vue
+5
-0
ee/app/assets/javascripts/external_issues_show/components/sidebar/assignee.vue
...ipts/external_issues_show/components/sidebar/assignee.vue
+0
-0
ee/app/assets/javascripts/external_issues_show/components/sidebar/issue_due_date.vue
...xternal_issues_show/components/sidebar/issue_due_date.vue
+0
-0
ee/app/assets/javascripts/external_issues_show/components/sidebar/issue_field.vue
...s/external_issues_show/components/sidebar/issue_field.vue
+0
-0
ee/app/assets/javascripts/external_issues_show/components/sidebar/issue_field_dropdown.vue
...l_issues_show/components/sidebar/issue_field_dropdown.vue
+0
-0
ee/app/assets/javascripts/external_issues_show/constants.js
ee/app/assets/javascripts/external_issues_show/constants.js
+13
-0
ee/app/assets/javascripts/integrations/jira/issues_show/components/jira_issues_show_root.vue
...ons/jira/issues_show/components/jira_issues_show_root.vue
+1
-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
+3
-3
ee/spec/frontend/external_issues_show/components/__snapshots__/note_spec.js.snap
...al_issues_show/components/__snapshots__/note_spec.js.snap
+0
-0
ee/spec/frontend/external_issues_show/components/note_spec.js
...pec/frontend/external_issues_show/components/note_spec.js
+7
-7
ee/spec/frontend/external_issues_show/components/sidebar/__snapshots__/assignee_spec.js.snap
...ow/components/sidebar/__snapshots__/assignee_spec.js.snap
+2
-2
ee/spec/frontend/external_issues_show/components/sidebar/assignee_spec.js
.../external_issues_show/components/sidebar/assignee_spec.js
+4
-4
ee/spec/frontend/external_issues_show/components/sidebar/issue_due_date_spec.js
...nal_issues_show/components/sidebar/issue_due_date_spec.js
+1
-1
ee/spec/frontend/external_issues_show/components/sidebar/issue_field_dropdown_spec.js
...sues_show/components/sidebar/issue_field_dropdown_spec.js
+5
-5
ee/spec/frontend/external_issues_show/components/sidebar/issue_field_spec.js
...ternal_issues_show/components/sidebar/issue_field_spec.js
+1
-1
ee/spec/frontend/external_issues_show/mock_data.js
ee/spec/frontend/external_issues_show/mock_data.js
+45
-0
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
..._show/components/sidebar/jira_issues_sidebar_root_spec.js
+3
-3
No files found.
ee/app/assets/javascripts/
integrations/jira/
issues_show/components/note.vue
→
ee/app/assets/javascripts/
external_
issues_show/components/note.vue
View file @
23f8597e
...
...
@@ -42,6 +42,11 @@ export default {
required
:
false
,
default
:
undefined
,
},
badgeText
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
},
computed
:
{
noteAnchor
()
{
...
...
ee/app/assets/javascripts/
integrations/jira/
issues_show/components/sidebar/assignee.vue
→
ee/app/assets/javascripts/
external_
issues_show/components/sidebar/assignee.vue
View file @
23f8597e
File moved
ee/app/assets/javascripts/
integrations/jira/
issues_show/components/sidebar/issue_due_date.vue
→
ee/app/assets/javascripts/
external_
issues_show/components/sidebar/issue_due_date.vue
View file @
23f8597e
File moved
ee/app/assets/javascripts/
integrations/jira/
issues_show/components/sidebar/issue_field.vue
→
ee/app/assets/javascripts/
external_
issues_show/components/sidebar/issue_field.vue
View file @
23f8597e
File moved
ee/app/assets/javascripts/
integrations/jira/
issues_show/components/sidebar/issue_field_dropdown.vue
→
ee/app/assets/javascripts/
external_
issues_show/components/sidebar/issue_field_dropdown.vue
View file @
23f8597e
File moved
ee/app/assets/javascripts/external_issues_show/constants.js
0 → 100644
View file @
23f8597e
import
{
__
}
from
'
~/locale
'
;
export
const
issueStates
=
{
OPENED
:
'
opened
'
,
CLOSED
:
'
closed
'
,
};
export
const
issueStateLabels
=
{
[
issueStates
.
OPENED
]:
__
(
'
Open
'
),
[
issueStates
.
CLOSED
]:
__
(
'
Closed
'
),
};
export
const
labelsFilterParam
=
'
labels
'
;
ee/app/assets/javascripts/integrations/jira/issues_show/components/jira_issues_show_root.vue
View file @
23f8597e
...
...
@@ -7,6 +7,7 @@ import {
GlBadge
,
GlTooltipDirective
as
GlTooltip
,
}
from
'
@gitlab/ui
'
;
import
Note
from
'
ee/external_issues_show/components/note.vue
'
;
import
{
fetchIssue
,
fetchIssueStatuses
,
updateIssue
}
from
'
ee/integrations/jira/issues_show/api
'
;
import
JiraIssueSidebar
from
'
ee/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root.vue
'
;
...
...
@@ -15,7 +16,6 @@ import createFlash from '~/flash';
import
IssuableShow
from
'
~/issuable_show/components/issuable_show_root.vue
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
import
Note
from
'
./note.vue
'
;
export
default
{
name
:
'
JiraIssuesShow
'
,
...
...
ee/app/assets/javascripts/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root.vue
View file @
23f8597e
<
script
>
import
Assignee
from
'
ee/external_issues_show/components/sidebar/assignee.vue
'
;
import
IssueDueDate
from
'
ee/external_issues_show/components/sidebar/issue_due_date.vue
'
;
import
IssueField
from
'
ee/external_issues_show/components/sidebar/issue_field.vue
'
;
import
{
labelsFilterParam
}
from
'
ee/integrations/jira/issues_show/constants
'
;
import
{
__
,
s__
}
from
'
~/locale
'
;
import
CopyableField
from
'
~/vue_shared/components/sidebar/copyable_field.vue
'
;
import
LabelsSelect
from
'
~/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
import
Assignee
from
'
./assignee.vue
'
;
import
IssueDueDate
from
'
./issue_due_date.vue
'
;
import
IssueField
from
'
./issue_field.vue
'
;
export
default
{
name
:
'
JiraIssuesSidebar
'
,
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/__snapshots__/note_spec.js.snap
→
ee/spec/frontend/
external_
issues_show/components/__snapshots__/note_spec.js.snap
View file @
23f8597e
File moved
ee/spec/frontend/
integrations/jira/
issues_show/components/note_spec.js
→
ee/spec/frontend/
external_
issues_show/components/note_spec.js
View file @
23f8597e
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
JiraIssueNote
from
'
ee/
integrations/jira/
issues_show/components/note.vue
'
;
import
JiraIssueNote
from
'
ee/
external_
issues_show/components/note.vue
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
mock
Jira
IssueComment
}
from
'
../mock_data
'
;
import
{
mock
External
IssueComment
}
from
'
../mock_data
'
;
describe
(
'
JiraIssuesNote
'
,
()
=>
{
let
wrapper
;
...
...
@@ -15,11 +15,11 @@ describe('JiraIssuesNote', () => {
wrapper
=
extendedWrapper
(
shallowMount
(
JiraIssueNote
,
{
propsData
:
{
authorName
:
mock
Jira
IssueComment
.
author
.
name
,
authorWebUrl
:
mock
Jira
IssueComment
.
author
.
web_url
,
authorAvatarUrl
:
mock
Jira
IssueComment
.
author
.
avatar_url
,
noteCreatedAt
:
mock
Jira
IssueComment
.
created_at
,
noteBodyHtml
:
mock
Jira
IssueComment
.
body_html
,
authorName
:
mock
External
IssueComment
.
author
.
name
,
authorWebUrl
:
mock
External
IssueComment
.
author
.
web_url
,
authorAvatarUrl
:
mock
External
IssueComment
.
author
.
avatar_url
,
noteCreatedAt
:
mock
External
IssueComment
.
created_at
,
noteBodyHtml
:
mock
External
IssueComment
.
body_html
,
...
props
,
},
slots
,
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/sidebar/__snapshots__/assignee_spec.js.snap
→
ee/spec/frontend/
external_
issues_show/components/sidebar/__snapshots__/assignee_spec.js.snap
View file @
23f8597e
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`
Jira
IssuesSidebarAssignee with assignee template renders avatar components 1`] = `
exports[`
External
IssuesSidebarAssignee with assignee template renders avatar components 1`] = `
<div>
<div
class="hide-collapsed"
...
...
@@ -44,7 +44,7 @@ exports[`JiraIssuesSidebarAssignee with assignee template renders avatar compone
</div>
`;
exports[`
Jira
IssuesSidebarAssignee with no assignee template renders template without avatar components (the "None" state) 1`] = `
exports[`
External
IssuesSidebarAssignee with no assignee template renders template without avatar components (the "None" state) 1`] = `
<div>
<div
class="hide-collapsed"
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/sidebar/assignee_spec.js
→
ee/spec/frontend/
external_
issues_show/components/sidebar/assignee_spec.js
View file @
23f8597e
import
{
GlAvatarLabeled
,
GlAvatarLink
,
GlAvatar
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Assignee
from
'
ee/
integrations/jira/
issues_show/components/sidebar/assignee.vue
'
;
import
Assignee
from
'
ee/
external_
issues_show/components/sidebar/assignee.vue
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
AssigneeTitle
from
'
~/sidebar/components/assignees/assignee_title.vue
'
;
import
{
mock
Jira
Issue
}
from
'
../../mock_data
'
;
import
{
mock
External
Issue
}
from
'
../../mock_data
'
;
const
mockAssignee
=
convertObjectPropsToCamelCase
(
mock
Jira
Issue
.
assignees
[
0
],
{
deep
:
true
});
const
mockAssignee
=
convertObjectPropsToCamelCase
(
mock
External
Issue
.
assignees
[
0
],
{
deep
:
true
});
describe
(
'
Jira
IssuesSidebarAssignee
'
,
()
=>
{
describe
(
'
External
IssuesSidebarAssignee
'
,
()
=>
{
let
wrapper
;
const
findNoAssigneeText
=
()
=>
wrapper
.
findByTestId
(
'
no-assignee-text
'
);
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/sidebar/issue_due_date_spec.js
→
ee/spec/frontend/
external_
issues_show/components/sidebar/issue_due_date_spec.js
View file @
23f8597e
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
IssueDueDate
from
'
ee/
integrations/jira/
issues_show/components/sidebar/issue_due_date.vue
'
;
import
IssueDueDate
from
'
ee/
external_
issues_show/components/sidebar/issue_due_date.vue
'
;
import
{
useFakeDate
}
from
'
helpers/fake_date
'
;
import
{
extendedWrapper
}
from
'
helpers/vue_test_utils_helper
'
;
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/sidebar/issue_field_dropdown_spec.js
→
ee/spec/frontend/
external_
issues_show/components/sidebar/issue_field_dropdown_spec.js
View file @
23f8597e
import
{
GlDropdownItem
,
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
IssueFieldDropdown
from
'
ee/
integrations/jira/
issues_show/components/sidebar/issue_field_dropdown.vue
'
;
import
IssueFieldDropdown
from
'
ee/
external_
issues_show/components/sidebar/issue_field_dropdown.vue
'
;
import
{
mock
Jira
IssueStatuses
}
from
'
../../mock_data
'
;
import
{
mock
External
IssueStatuses
}
from
'
../../mock_data
'
;
describe
(
'
IssueFieldDropdown
'
,
()
=>
{
let
wrapper
;
...
...
@@ -31,9 +31,9 @@ describe('IssueFieldDropdown', () => {
it
.
each
`
loading | items
${
true
}
|
${[]}
${
true
}
|
${
mock
Jira
IssueStatuses
}
${
true
}
|
${
mock
External
IssueStatuses
}
${
false
}
|
${[]}
${
false
}
|
${
mock
Jira
IssueStatuses
}
${
false
}
|
${
mock
External
IssueStatuses
}
`
(
'
with loading = $loading, items = $items
'
,
({
loading
,
items
})
=>
{
createComponent
({
props
:
{
...
...
@@ -47,7 +47,7 @@ describe('IssueFieldDropdown', () => {
if
(
!
loading
)
{
if
(
items
.
length
)
{
findAllGlDropdownItems
().
wrappers
.
forEach
((
itemWrapper
,
index
)
=>
{
expect
(
itemWrapper
.
text
()).
toBe
(
mock
Jira
IssueStatuses
[
index
].
title
);
expect
(
itemWrapper
.
text
()).
toBe
(
mock
External
IssueStatuses
[
index
].
title
);
});
}
else
{
expect
(
wrapper
.
text
()).
toBe
(
emptyText
);
...
...
ee/spec/frontend/
integrations/jira/
issues_show/components/sidebar/issue_field_spec.js
→
ee/spec/frontend/
external_
issues_show/components/sidebar/issue_field_spec.js
View file @
23f8597e
import
{
GlButton
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
IssueField
from
'
ee/
integrations/jira/
issues_show/components/sidebar/issue_field.vue
'
;
import
IssueField
from
'
ee/
external_
issues_show/components/sidebar/issue_field.vue
'
;
import
{
createMockDirective
,
getBinding
}
from
'
helpers/vue_mock_directive
'
;
import
{
shallowMountExtended
}
from
'
helpers/vue_test_utils_helper
'
;
...
...
ee/spec/frontend/external_issues_show/mock_data.js
0 → 100644
View file @
23f8597e
export
const
mockExternalIssue
=
{
title
:
'
FE-2 The second FE issue on Jira
'
,
description_html
:
'
<a href="https://jira.reali.sh:8080/projects/FE/issues/FE-2">FE-2</a> The second FE issue on Jira
'
,
created_at
:
'
"2021-02-01T04:04:40.833Z"
'
,
author
:
{
name
:
'
Justin Ho
'
,
web_url
:
'
http://127.0.0.1:3000/root
'
,
avatar_url
:
'
http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png?width=90
'
,
},
assignees
:
[
{
name
:
'
Justin Ho
'
,
web_url
:
'
http://127.0.0.1:3000/root
'
,
avatar_url
:
'
http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png?width=90
'
,
},
],
due_date
:
'
2021-02-14T00:00:00.000Z
'
,
labels
:
[
{
title
:
'
In Progress
'
,
description
:
'
Work that is still in progress
'
,
color
:
'
#0052CC
'
,
text_color
:
'
#FFFFFF
'
,
},
],
references
:
{
relative
:
'
FE-2
'
,
},
state
:
'
opened
'
,
status
:
'
In Progress
'
,
};
export
const
mockExternalIssueComment
=
{
body_html
:
'
<p>hi</p>
'
,
created_at
:
'
"2021-02-01T04:04:40.833Z"
'
,
author
:
{
name
:
'
Justin Ho
'
,
web_url
:
'
http://127.0.0.1:3000/root
'
,
avatar_url
:
'
http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png?width=90
'
,
},
id
:
10000
,
};
export
const
mockExternalIssueStatuses
=
[{
title
:
'
In Progress
'
},
{
title
:
'
Done
'
}];
ee/spec/frontend/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root_spec.js
View file @
23f8597e
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
Assignee
from
'
ee/
integrations/jira/
issues_show/components/sidebar/assignee.vue
'
;
import
IssueDueDate
from
'
ee/
integrations/jira/
issues_show/components/sidebar/issue_due_date.vue
'
;
import
IssueField
from
'
ee/
integrations/jira/
issues_show/components/sidebar/issue_field.vue
'
;
import
Assignee
from
'
ee/
external_
issues_show/components/sidebar/assignee.vue
'
;
import
IssueDueDate
from
'
ee/
external_
issues_show/components/sidebar/issue_due_date.vue
'
;
import
IssueField
from
'
ee/
external_
issues_show/components/sidebar/issue_field.vue
'
;
import
Sidebar
from
'
ee/integrations/jira/issues_show/components/sidebar/jira_issues_sidebar_root.vue
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
import
CopyableField
from
'
~/vue_shared/components/sidebar/copyable_field.vue
'
;
...
...
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