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
743ee5d6
Commit
743ee5d6
authored
Jan 12, 2022
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Incident sidebar on issue boards
Changelog: fixed
parent
dfdb363a
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
598 additions
and
15 deletions
+598
-15
app/assets/javascripts/boards/components/board_content_sidebar.vue
...s/javascripts/boards/components/board_content_sidebar.vue
+20
-6
app/assets/javascripts/boards/constants.js
app/assets/javascripts/boards/constants.js
+1
-0
app/assets/javascripts/boards/graphql/issue.fragment.graphql
app/assets/javascripts/boards/graphql/issue.fragment.graphql
+2
-0
ee/app/assets/javascripts/boards/graphql/issue.fragment.graphql
.../assets/javascripts/boards/graphql/issue.fragment.graphql
+2
-0
ee/spec/frontend/boards/components/__snapshots__/board_content_sidebar_spec.js.snap
...mponents/__snapshots__/board_content_sidebar_spec.js.snap
+530
-1
ee/spec/frontend/boards/components/board_content_sidebar_spec.js
.../frontend/boards/components/board_content_sidebar_spec.js
+22
-8
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/frontend/boards/components/board_content_sidebar_spec.js
.../frontend/boards/components/board_content_sidebar_spec.js
+18
-0
No files found.
app/assets/javascripts/boards/components/board_content_sidebar.vue
View file @
743ee5d6
...
@@ -6,11 +6,12 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow
...
@@ -6,11 +6,12 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
BoardSidebarTimeTracker
from
'
~/boards/components/sidebar/board_sidebar_time_tracker.vue
'
;
import
BoardSidebarTimeTracker
from
'
~/boards/components/sidebar/board_sidebar_time_tracker.vue
'
;
import
BoardSidebarTitle
from
'
~/boards/components/sidebar/board_sidebar_title.vue
'
;
import
BoardSidebarTitle
from
'
~/boards/components/sidebar/board_sidebar_title.vue
'
;
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
{
ISSUABLE
,
INCIDENT
}
from
'
~/boards/constants
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
{
getIdFromGraphQLId
}
from
'
~/graphql_shared/utils
'
;
import
SidebarAssigneesWidget
from
'
~/sidebar/components/assignees/sidebar_assignees_widget.vue
'
;
import
SidebarAssigneesWidget
from
'
~/sidebar/components/assignees/sidebar_assignees_widget.vue
'
;
import
SidebarConfidentialityWidget
from
'
~/sidebar/components/confidential/sidebar_confidentiality_widget.vue
'
;
import
SidebarConfidentialityWidget
from
'
~/sidebar/components/confidential/sidebar_confidentiality_widget.vue
'
;
import
SidebarDateWidget
from
'
~/sidebar/components/date/sidebar_date_widget.vue
'
;
import
SidebarDateWidget
from
'
~/sidebar/components/date/sidebar_date_widget.vue
'
;
import
SidebarSeverity
from
'
~/sidebar/components/severity/sidebar_severity.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
import
SidebarLabelsWidget
from
'
~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
'
;
import
SidebarLabelsWidget
from
'
~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
'
;
...
@@ -29,6 +30,7 @@ export default {
...
@@ -29,6 +30,7 @@ export default {
SidebarSubscriptionsWidget
,
SidebarSubscriptionsWidget
,
SidebarDropdownWidget
,
SidebarDropdownWidget
,
SidebarTodoWidget
,
SidebarTodoWidget
,
SidebarSeverity
,
MountingPortal
,
MountingPortal
,
SidebarWeightWidget
:
()
=>
SidebarWeightWidget
:
()
=>
import
(
'
ee_component/sidebar/components/weight/sidebar_weight_widget.vue
'
),
import
(
'
ee_component/sidebar/components/weight/sidebar_weight_widget.vue
'
),
...
@@ -69,9 +71,15 @@ export default {
...
@@ -69,9 +71,15 @@ export default {
isIssuableSidebar
()
{
isIssuableSidebar
()
{
return
this
.
sidebarType
===
ISSUABLE
;
return
this
.
sidebarType
===
ISSUABLE
;
},
},
isIncidentSidebar
()
{
return
this
.
activeBoardItem
.
type
===
INCIDENT
;
},
showSidebar
()
{
showSidebar
()
{
return
this
.
isIssuableSidebar
&&
this
.
isSidebarOpen
;
return
this
.
isIssuableSidebar
&&
this
.
isSidebarOpen
;
},
},
sidebarTitle
()
{
return
this
.
isIncidentSidebar
?
__
(
'
Incident details
'
)
:
__
(
'
Issue details
'
);
},
fullPath
()
{
fullPath
()
{
return
this
.
activeBoardItem
?.
referencePath
?.
split
(
'
#
'
)[
0
]
||
''
;
return
this
.
activeBoardItem
?.
referencePath
?.
split
(
'
#
'
)[
0
]
||
''
;
},
},
...
@@ -138,7 +146,7 @@ export default {
...
@@ -138,7 +146,7 @@ export default {
@
close=
"handleClose"
@
close=
"handleClose"
>
>
<template
#title
>
<template
#title
>
<h2
class=
"gl-my-0 gl-font-size-h2 gl-line-height-24"
>
{{
__
(
'
Issue details
'
)
}}
</h2>
<h2
class=
"gl-my-0 gl-font-size-h2 gl-line-height-24"
>
{{
sidebarTitle
}}
</h2>
</
template
>
</
template
>
<
template
#header
>
<
template
#header
>
<sidebar-todo-widget
<sidebar-todo-widget
...
@@ -159,7 +167,7 @@ export default {
...
@@ -159,7 +167,7 @@ export default {
@
assignees-updated=
"setAssignees"
@
assignees-updated=
"setAssignees"
/>
/>
<sidebar-dropdown-widget
<sidebar-dropdown-widget
v-if=
"epicFeatureAvailable"
v-if=
"epicFeatureAvailable
&& !isIncidentSidebar
"
:iid=
"activeBoardItem.iid"
:iid=
"activeBoardItem.iid"
issuable-attribute=
"epic"
issuable-attribute=
"epic"
:workspace-path=
"projectPathForActiveIssue"
:workspace-path=
"projectPathForActiveIssue"
...
@@ -178,7 +186,7 @@ export default {
...
@@ -178,7 +186,7 @@ export default {
/>
/>
<template
v-if=
"!glFeatures.iterationCadences"
>
<template
v-if=
"!glFeatures.iterationCadences"
>
<sidebar-dropdown-widget
<sidebar-dropdown-widget
v-if=
"iterationFeatureAvailable"
v-if=
"iterationFeatureAvailable
&& !isIncidentSidebar
"
:iid=
"activeBoardItem.iid"
:iid=
"activeBoardItem.iid"
issuable-attribute=
"iteration"
issuable-attribute=
"iteration"
:workspace-path=
"projectPathForActiveIssue"
:workspace-path=
"projectPathForActiveIssue"
...
@@ -190,7 +198,7 @@ export default {
...
@@ -190,7 +198,7 @@ export default {
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<iteration-sidebar-dropdown-widget
<iteration-sidebar-dropdown-widget
v-if=
"iterationFeatureAvailable"
v-if=
"iterationFeatureAvailable
&& !isIncidentSidebar
"
:iid=
"activeBoardItem.iid"
:iid=
"activeBoardItem.iid"
:workspace-path=
"projectPathForActiveIssue"
:workspace-path=
"projectPathForActiveIssue"
:attr-workspace-path=
"groupPathForActiveIssue"
:attr-workspace-path=
"groupPathForActiveIssue"
...
@@ -226,8 +234,14 @@ export default {
...
@@ -226,8 +234,14 @@ export default {
>
>
{{ __('None') }}
{{ __('None') }}
</sidebar-labels-widget>
</sidebar-labels-widget>
<sidebar-severity
v-if=
"isIncidentSidebar"
:iid=
"activeBoardItem.iid"
:project-path=
"fullPath"
:initial-severity=
"activeBoardItem.severity"
/>
<sidebar-weight-widget
<sidebar-weight-widget
v-if=
"weightFeatureAvailable"
v-if=
"weightFeatureAvailable
&& !isIncidentSidebar
"
:iid=
"activeBoardItem.iid"
:iid=
"activeBoardItem.iid"
:full-path=
"fullPath"
:full-path=
"fullPath"
:issuable-type=
"issuableType"
:issuable-type=
"issuableType"
...
...
app/assets/javascripts/boards/constants.js
View file @
743ee5d6
...
@@ -54,6 +54,7 @@ export const inactiveId = 0;
...
@@ -54,6 +54,7 @@ export const inactiveId = 0;
export
const
ISSUABLE
=
'
issuable
'
;
export
const
ISSUABLE
=
'
issuable
'
;
export
const
LIST
=
'
list
'
;
export
const
LIST
=
'
list
'
;
export
const
INCIDENT
=
'
INCIDENT
'
;
export
const
flashAnimationDuration
=
2000
;
export
const
flashAnimationDuration
=
2000
;
...
...
app/assets/javascripts/boards/graphql/issue.fragment.graphql
View file @
743ee5d6
...
@@ -16,6 +16,8 @@ fragment IssueNode on Issue {
...
@@ -16,6 +16,8 @@ fragment IssueNode on Issue {
hidden
hidden
webUrl
webUrl
relativePosition
relativePosition
type
severity
milestone
{
milestone
{
...
MilestoneFragment
...
MilestoneFragment
}
}
...
...
ee/app/assets/javascripts/boards/graphql/issue.fragment.graphql
View file @
743ee5d6
...
@@ -18,6 +18,8 @@ fragment IssueNode on Issue {
...
@@ -18,6 +18,8 @@ fragment IssueNode on Issue {
blocked
blocked
blockedByCount
blockedByCount
relativePosition
relativePosition
type
severity
epic
{
epic
{
id
id
}
}
...
...
ee/spec/frontend/boards/components/__snapshots__/board_content_sidebar_spec.js.snap
View file @
743ee5d6
This diff is collapsed.
Click to expand it.
ee/spec/frontend/boards/components/board_content_sidebar_spec.js
View file @
743ee5d6
...
@@ -86,17 +86,31 @@ describe('ee/BoardContentSidebar', () => {
...
@@ -86,17 +86,31 @@ describe('ee/BoardContentSidebar', () => {
});
});
};
};
afterEach
(()
=>
{
wrapper
.
destroy
();
});
describe
(
'
issue sidebar
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createStore
();
createStore
();
createComponent
();
createComponent
();
});
});
afterEach
(()
=>
{
it
(
'
matches the snapshot
'
,
()
=>
{
wrapper
.
destroy
();
expect
(
wrapper
.
find
(
GlDrawer
).
element
).
toMatchSnapshot
();
wrapper
=
null
;
});
});
describe
(
'
incident sidebar
'
,
()
=>
{
beforeEach
(()
=>
{
createStore
({
mockGetters
:
{
activeBoardItem
:
()
=>
({
...
mockIssue
,
epic
:
null
,
type
:
'
INCIDENT
'
})
},
});
createComponent
();
});
});
it
(
'
matches the snapshot
'
,
()
=>
{
it
(
'
matches the snapshot
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlDrawer
).
element
).
toMatchSnapshot
();
expect
(
wrapper
.
find
(
GlDrawer
).
element
).
toMatchSnapshot
();
});
});
});
});
});
locale/gitlab.pot
View file @
743ee5d6
...
@@ -18654,6 +18654,9 @@ msgstr ""
...
@@ -18654,6 +18654,9 @@ msgstr ""
msgid "Incident Management Limits"
msgid "Incident Management Limits"
msgstr ""
msgstr ""
msgid "Incident details"
msgstr ""
msgid "Incident template (optional)."
msgid "Incident template (optional)."
msgstr ""
msgstr ""
...
...
spec/frontend/boards/components/board_content_sidebar_spec.js
View file @
743ee5d6
...
@@ -9,6 +9,7 @@ import BoardContentSidebar from '~/boards/components/board_content_sidebar.vue';
...
@@ -9,6 +9,7 @@ import BoardContentSidebar from '~/boards/components/board_content_sidebar.vue';
import
BoardSidebarTitle
from
'
~/boards/components/sidebar/board_sidebar_title.vue
'
;
import
BoardSidebarTitle
from
'
~/boards/components/sidebar/board_sidebar_title.vue
'
;
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
{
ISSUABLE
}
from
'
~/boards/constants
'
;
import
SidebarDateWidget
from
'
~/sidebar/components/date/sidebar_date_widget.vue
'
;
import
SidebarDateWidget
from
'
~/sidebar/components/date/sidebar_date_widget.vue
'
;
import
SidebarSeverity
from
'
~/sidebar/components/severity/sidebar_severity.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
SidebarSubscriptionsWidget
from
'
~/sidebar/components/subscriptions/sidebar_subscriptions_widget.vue
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
import
SidebarTodoWidget
from
'
~/sidebar/components/todo_toggle/sidebar_todo_widget.vue
'
;
import
SidebarLabelsWidget
from
'
~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
'
;
import
SidebarLabelsWidget
from
'
~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
'
;
...
@@ -141,6 +142,10 @@ describe('BoardContentSidebar', () => {
...
@@ -141,6 +142,10 @@ describe('BoardContentSidebar', () => {
);
);
});
});
it
(
'
does not render SidebarSeverity
'
,
()
=>
{
expect
(
wrapper
.
find
(
SidebarSeverity
).
exists
()).
toBe
(
false
);
});
describe
(
'
when we emit close
'
,
()
=>
{
describe
(
'
when we emit close
'
,
()
=>
{
let
toggleBoardItem
;
let
toggleBoardItem
;
...
@@ -160,4 +165,17 @@ describe('BoardContentSidebar', () => {
...
@@ -160,4 +165,17 @@ describe('BoardContentSidebar', () => {
});
});
});
});
});
});
describe
(
'
incident sidebar
'
,
()
=>
{
beforeEach
(()
=>
{
createStore
({
mockGetters
:
{
activeBoardItem
:
()
=>
({
...
mockIssue
,
epic
:
null
,
type
:
'
INCIDENT
'
})
},
});
createComponent
();
});
it
(
'
renders SidebarSeverity
'
,
()
=>
{
expect
(
wrapper
.
find
(
SidebarSeverity
).
exists
()).
toBe
(
true
);
});
});
});
});
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