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
12a16d18
Commit
12a16d18
authored
Oct 12, 2021
by
Ammar Alakkad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show blocked icon on epic blocked issues
Changelog: added EE: true
parent
a97ccbe5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
app/graphql/queries/epic/epic_children.query.graphql
app/graphql/queries/epic/epic_children.query.graphql
+1
-0
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
...ascripts/related_items_tree/components/tree_item_body.vue
+9
-0
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
...tend/related_items_tree/components/tree_item_body_spec.js
+22
-0
No files found.
app/graphql/queries/epic/epic_children.query.graphql
View file @
12a16d18
...
@@ -89,6 +89,7 @@ query childItems(
...
@@ -89,6 +89,7 @@ query childItems(
iid
iid
epicIssueId
epicIssueId
title
title
blocked
closedAt
closedAt
state
state
createdAt
createdAt
...
...
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
View file @
12a16d18
...
@@ -66,6 +66,9 @@ export default {
...
@@ -66,6 +66,9 @@ export default {
isOpen
()
{
isOpen
()
{
return
this
.
item
.
state
===
ChildState
.
Open
;
return
this
.
item
.
state
===
ChildState
.
Open
;
},
},
isBlocked
()
{
return
this
.
item
.
blocked
;
},
isClosed
()
{
isClosed
()
{
return
this
.
item
.
state
===
ChildState
.
Closed
;
return
this
.
item
.
state
===
ChildState
.
Closed
;
},
},
...
@@ -85,9 +88,15 @@ export default {
...
@@ -85,9 +88,15 @@ export default {
if
(
this
.
item
.
type
===
ChildType
.
Epic
)
{
if
(
this
.
item
.
type
===
ChildType
.
Epic
)
{
return
this
.
isOpen
?
'
epic
'
:
'
epic-closed
'
;
return
this
.
isOpen
?
'
epic
'
:
'
epic-closed
'
;
}
}
if
(
this
.
isBlocked
&&
this
.
isOpen
)
{
return
'
issue-block
'
;
}
return
this
.
isOpen
?
'
issues
'
:
'
issue-closed
'
;
return
this
.
isOpen
?
'
issues
'
:
'
issue-closed
'
;
},
},
stateIconClass
()
{
stateIconClass
()
{
if
(
this
.
isBlocked
&&
this
.
isOpen
)
{
return
'
gl-text-red-500
'
;
}
return
this
.
isOpen
return
this
.
isOpen
?
'
issue-token-state-icon-open gl-text-green-500
'
?
'
issue-token-state-icon-open gl-text-green-500
'
:
'
issue-token-state-icon-closed gl-text-blue-500
'
;
:
'
issue-token-state-icon-closed gl-text-blue-500
'
;
...
...
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
View file @
12a16d18
...
@@ -142,6 +142,18 @@ describe('RelatedItemsTree', () => {
...
@@ -142,6 +142,18 @@ describe('RelatedItemsTree', () => {
});
});
});
});
describe
(
'
isBlocked
'
,
()
=>
{
it
(
'
returns true when `item.blocked` value is `true`
'
,
()
=>
{
wrapper
.
setProps
({
item
:
{
...
mockItem
,
blocked
:
true
},
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
vm
.
isBlocked
).
toBe
(
true
);
});
});
});
describe
(
'
isClosed
'
,
()
=>
{
describe
(
'
isClosed
'
,
()
=>
{
it
(
'
returns true when `item.state` value is `closed`
'
,
()
=>
{
it
(
'
returns true when `item.state` value is `closed`
'
,
()
=>
{
wrapper
.
setProps
({
wrapper
.
setProps
({
...
@@ -199,6 +211,16 @@ describe('RelatedItemsTree', () => {
...
@@ -199,6 +211,16 @@ describe('RelatedItemsTree', () => {
});
});
});
});
it
(
'
return string `gl-text-red-500` when `item.blocked` value is `true`
'
,
()
=>
{
wrapper
.
setProps
({
item
:
{
...
mockItem
,
blocked
:
true
},
});
return
wrapper
.
vm
.
$nextTick
(()
=>
{
expect
(
wrapper
.
vm
.
stateIconClass
).
toBe
(
'
gl-text-red-500
'
);
});
});
it
(
'
returns string `issue-token-state-icon-closed gl-text-blue-500` when `item.state` value is `closed`
'
,
()
=>
{
it
(
'
returns string `issue-token-state-icon-closed gl-text-blue-500` when `item.state` value is `closed`
'
,
()
=>
{
wrapper
.
setProps
({
wrapper
.
setProps
({
item
:
{
...
mockItem
,
state
:
ChildState
.
Closed
},
item
:
{
...
mockItem
,
state
:
ChildState
.
Closed
},
...
...
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