Commit 1676eca9 authored by Mike Greiling's avatar Mike Greiling

Merge branch '34723-visually-differentiate-blocked-issues' into 'master'

Add blocked icon on issue board card

Closes #34723

See merge request gitlab-org/gitlab!24420
parents 3bbb9a7b 3e93d7f8
......@@ -161,6 +161,14 @@ export default {
<div>
<div class="d-flex board-card-header" dir="auto">
<h4 class="board-card-title append-bottom-0 prepend-top-0">
<icon
v-if="issue.blocked"
v-gl-tooltip
name="issue-block"
:title="__('Blocked issue')"
class="issue-blocked-icon append-right-4"
:aria-label="__('Blocked issue')"
/>
<icon
v-if="issue.confidential"
v-gl-tooltip
......
......@@ -37,6 +37,7 @@ class ListIssue {
this.project_id = obj.project_id;
this.timeEstimate = obj.time_estimate;
this.assignableLabelsEndpoint = obj.assignable_labels_endpoint;
this.blocked = obj.blocked;
if (obj.project) {
this.project = new IssueProject(obj.project);
......
......@@ -287,6 +287,10 @@
cursor: help;
}
.issue-blocked-icon {
color: $red-500;
}
@include media-breakpoint-down(md) {
padding: $gl-padding-8;
}
......
---
title: Add blocked icon on issue board card
merge_request: 24420
author:
type: added
......@@ -303,6 +303,14 @@ Different issue board features are available in different [GitLab tiers](https:/
| Premium / Silver | Multiple | Multiple | Yes | Yes |
| Ultimate / Gold | Multiple | Multiple | Yes | Yes |
## Blocked issues
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/34723) in GitLab 12.8.
If an issue is blocked by another issue, an icon will display next to its title to differentiate it from unblocked issues.
![Blocked issues](img/issue_boards_blocked_icon_v12_8.png)
## Actions you can take on an Issue Board
- [Create a new list](#creating-a-new-list).
......
......@@ -2768,6 +2768,9 @@ msgstr ""
msgid "Blocked"
msgstr ""
msgid "Blocked issue"
msgstr ""
msgid "Blocks"
msgstr ""
......
......@@ -66,7 +66,11 @@ describe('Issue card component', () => {
});
it('does not render confidential icon', () => {
expect(wrapper.find('.fa-eye-flash').exists()).toBe(false);
expect(wrapper.find('.confidential-icon').exists()).toBe(false);
});
it('does not render blocked icon', () => {
expect(wrapper.find('.issue-blocked-icon').exists()).toBe(false);
});
it('renders confidential icon', done => {
......@@ -324,4 +328,20 @@ describe('Issue card component', () => {
.catch(done.fail);
});
});
describe('blocked', () => {
beforeEach(done => {
wrapper.setProps({
issue: {
...wrapper.props('issue'),
blocked: true,
},
});
wrapper.vm.$nextTick(done);
});
it('renders blocked icon if issue is blocked', () => {
expect(wrapper.find('.issue-blocked-icon').exists()).toBe(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