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
c1b4317f
Commit
c1b4317f
authored
Apr 26, 2021
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show group path in epic reference
Show full group path for an epic with reference within epics list.
parent
78deb796
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
ee/app/assets/javascripts/epics_list/components/epics_list_root.vue
...ets/javascripts/epics_list/components/epics_list_root.vue
+10
-0
ee/app/assets/javascripts/epics_list/queries/group_epics.query.graphql
.../javascripts/epics_list/queries/group_epics.query.graphql
+3
-0
ee/spec/frontend/epics_list/components/epics_list_root_spec.js
...ec/frontend/epics_list/components/epics_list_root_spec.js
+26
-0
No files found.
ee/app/assets/javascripts/epics_list/components/epics_list_root.vue
View file @
c1b4317f
...
@@ -141,6 +141,13 @@ export default {
...
@@ -141,6 +141,13 @@ export default {
},
},
},
},
methods
:
{
methods
:
{
epicReference
(
epic
)
{
const
reference
=
`
${
this
.
$options
.
epicSymbol
}${
epic
.
iid
}
`
;
if
(
epic
.
group
.
fullPath
!==
this
.
groupFullPath
)
{
return
`
${
epic
.
group
.
fullPath
}${
reference
}
`
;
}
return
reference
;
},
epicTimeframe
({
startDate
,
dueDate
})
{
epicTimeframe
({
startDate
,
dueDate
})
{
const
start
=
startDate
?
parsePikadayDate
(
startDate
)
:
null
;
const
start
=
startDate
?
parsePikadayDate
(
startDate
)
:
null
;
const
due
=
dueDate
?
parsePikadayDate
(
dueDate
)
:
null
;
const
due
=
dueDate
?
parsePikadayDate
(
dueDate
)
:
null
;
...
@@ -225,6 +232,9 @@ export default {
...
@@ -225,6 +232,9 @@ export default {
__
(
'
New epic
'
)
__
(
'
New epic
'
)
}}
</gl-button>
}}
</gl-button>
</
template
>
</
template
>
<
template
#reference=
"{ issuable }"
>
<span
class=
"issuable-reference"
>
{{
epicReference
(
issuable
)
}}
</span>
</
template
>
<
template
#timeframe=
"{ issuable }"
>
<
template
#timeframe=
"{ issuable }"
>
<gl-icon
name=
"calendar"
/>
<gl-icon
name=
"calendar"
/>
{{
epicTimeframe
(
issuable
)
}}
{{
epicTimeframe
(
issuable
)
}}
...
...
ee/app/assets/javascripts/epics_list/queries/group_epics.query.graphql
View file @
c1b4317f
...
@@ -43,6 +43,9 @@ query groupEpics(
...
@@ -43,6 +43,9 @@ query groupEpics(
webUrl
webUrl
userDiscussionsCount
userDiscussionsCount
confidential
confidential
group
{
fullPath
}
author
{
author
{
...
Author
...
Author
}
}
...
...
ee/spec/frontend/epics_list/components/epics_list_root_spec.js
View file @
c1b4317f
...
@@ -102,6 +102,32 @@ describe('EpicsListRoot', () => {
...
@@ -102,6 +102,32 @@ describe('EpicsListRoot', () => {
});
});
describe
(
'
methods
'
,
()
=>
{
describe
(
'
methods
'
,
()
=>
{
describe
(
'
epicReference
'
,
()
=>
{
const
mockEpicWithPath
=
{
...
mockFormattedEpic
,
group
:
{
fullPath
:
'
gitlab-org/marketing
'
,
},
};
const
mockEpicWithoutPath
=
{
...
mockFormattedEpic
,
group
:
{
fullPath
:
'
gitlab-org
'
,
},
};
it
.
each
`
epic | reference
${
mockEpicWithPath
}
|
${
'
gitlab-org/marketing&2
'
}
${
mockEpicWithoutPath
}
|
${
'
&2
'
}
`
(
'
returns string "$reference" based on provided `epic.group.fullPath`
'
,
({
epic
,
reference
})
=>
{
expect
(
wrapper
.
vm
.
epicReference
(
epic
)).
toBe
(
reference
);
},
);
});
describe
(
'
epicTimeframe
'
,
()
=>
{
describe
(
'
epicTimeframe
'
,
()
=>
{
it
.
each
`
it
.
each
`
startDate | dueDate | returnValue
startDate | dueDate | returnValue
...
...
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