diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-20 12:16:11 +0300 |
commit | edaa33dee2ff2f7ea3fac488d41558eb5f86d68c (patch) | |
tree | 11f143effbfeba52329fb7afbd05e6e2a3790241 /app/assets/javascripts/boards | |
parent | d8a5691316400a0f7ec4f83832698f1988eb27c1 (diff) |
Add latest changes from gitlab-org/gitlab@14-7-stable-eev14.7.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards')
13 files changed, 57 insertions, 52 deletions
diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index 563bed6a6b8..dc821cb9f58 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -72,7 +72,7 @@ export default { data-qa-selector="board_card" :class="{ 'multi-select': multiSelectVisible, - 'user-can-drag': isDraggable, + 'gl-cursor-grab': isDraggable, 'is-disabled': isDisabled, 'is-active': isActive, 'gl-cursor-not-allowed gl-bg-gray-10': item.isLoading, diff --git a/app/assets/javascripts/boards/components/board_content_sidebar.vue b/app/assets/javascripts/boards/components/board_content_sidebar.vue index f89f8e5feb8..156029b62b0 100644 --- a/app/assets/javascripts/boards/components/board_content_sidebar.vue +++ b/app/assets/javascripts/boards/components/board_content_sidebar.vue @@ -6,11 +6,12 @@ import SidebarDropdownWidget from 'ee_else_ce/sidebar/components/sidebar_dropdow import { __, sprintf } from '~/locale'; import BoardSidebarTimeTracker from '~/boards/components/sidebar/board_sidebar_time_tracker.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 SidebarAssigneesWidget from '~/sidebar/components/assignees/sidebar_assignees_widget.vue'; import SidebarConfidentialityWidget from '~/sidebar/components/confidential/sidebar_confidentiality_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 SidebarTodoWidget from '~/sidebar/components/todo_toggle/sidebar_todo_widget.vue'; import SidebarLabelsWidget from '~/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue'; @@ -29,6 +30,7 @@ export default { SidebarSubscriptionsWidget, SidebarDropdownWidget, SidebarTodoWidget, + SidebarSeverity, MountingPortal, SidebarWeightWidget: () => import('ee_component/sidebar/components/weight/sidebar_weight_widget.vue'), @@ -69,9 +71,15 @@ export default { isIssuableSidebar() { return this.sidebarType === ISSUABLE; }, + isIncidentSidebar() { + return this.activeBoardItem.type === INCIDENT; + }, showSidebar() { return this.isIssuableSidebar && this.isSidebarOpen; }, + sidebarTitle() { + return this.isIncidentSidebar ? __('Incident details') : __('Issue details'); + }, fullPath() { return this.activeBoardItem?.referencePath?.split('#')[0] || ''; }, @@ -138,7 +146,7 @@ export default { @close="handleClose" > <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 #header> <sidebar-todo-widget @@ -159,7 +167,7 @@ export default { @assignees-updated="setAssignees" /> <sidebar-dropdown-widget - v-if="epicFeatureAvailable" + v-if="epicFeatureAvailable && !isIncidentSidebar" :iid="activeBoardItem.iid" issuable-attribute="epic" :workspace-path="projectPathForActiveIssue" @@ -178,7 +186,7 @@ export default { /> <template v-if="!glFeatures.iterationCadences"> <sidebar-dropdown-widget - v-if="iterationFeatureAvailable" + v-if="iterationFeatureAvailable && !isIncidentSidebar" :iid="activeBoardItem.iid" issuable-attribute="iteration" :workspace-path="projectPathForActiveIssue" @@ -190,7 +198,7 @@ export default { </template> <template v-else> <iteration-sidebar-dropdown-widget - v-if="iterationFeatureAvailable" + v-if="iterationFeatureAvailable && !isIncidentSidebar" :iid="activeBoardItem.iid" :workspace-path="projectPathForActiveIssue" :attr-workspace-path="groupPathForActiveIssue" @@ -200,7 +208,7 @@ export default { /> </template> </div> - <board-sidebar-time-tracker class="swimlanes-sidebar-time-tracker" /> + <board-sidebar-time-tracker /> <sidebar-date-widget :iid="activeBoardItem.iid" :full-path="fullPath" @@ -209,7 +217,6 @@ export default { /> <sidebar-labels-widget class="block labels" - data-testid="sidebar-labels" :iid="activeBoardItem.iid" :full-path="projectPathForActiveIssue" :allow-label-remove="allowLabelEdit" @@ -227,8 +234,14 @@ export default { > {{ __('None') }} </sidebar-labels-widget> + <sidebar-severity + v-if="isIncidentSidebar" + :iid="activeBoardItem.iid" + :project-path="fullPath" + :initial-severity="activeBoardItem.severity" + /> <sidebar-weight-widget - v-if="weightFeatureAvailable" + v-if="weightFeatureAvailable && !isIncidentSidebar" :iid="activeBoardItem.iid" :full-path="fullPath" :issuable-type="issuableType" diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue index 09ec385bbba..2599d1c80b8 100644 --- a/app/assets/javascripts/boards/components/board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/board_filtered_search.vue @@ -6,6 +6,7 @@ import { updateHistory, setUrlParams } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants'; import FilteredSearch from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; +import { AssigneeFilterType } from '~/boards/constants'; export default { i18n: { @@ -37,6 +38,7 @@ export default { authorUsername, labelName, assigneeUsername, + assigneeId, search, milestoneTitle, iterationId, @@ -63,6 +65,13 @@ export default { }); } + if (assigneeId) { + filteredSearchValue.push({ + type: 'assignee', + value: { data: assigneeId, operator: '=' }, + }); + } + if (types) { filteredSearchValue.push({ type: 'type', @@ -211,6 +220,7 @@ export default { authorUsername, labelName, assigneeUsername, + assigneeId, search, milestoneTitle, types, @@ -246,6 +256,7 @@ export default { author_username: authorUsername, 'label_name[]': labelName, assignee_username: assigneeUsername, + assignee_id: assigneeId, milestone_title: milestoneTitle, iteration_id: iterationId, search, @@ -295,7 +306,11 @@ export default { filterParams.authorUsername = filter.value.data; break; case 'assignee': - filterParams.assigneeUsername = filter.value.data; + if (Object.values(AssigneeFilterType).includes(filter.value.data)) { + filterParams.assigneeId = filter.value.data; + } else { + filterParams.assigneeUsername = filter.value.data; + } break; case 'type': filterParams.types = filter.value.data; diff --git a/app/assets/javascripts/boards/components/board_list_header.vue b/app/assets/javascripts/boards/components/board_list_header.vue index 19004518edf..6835d83a66c 100644 --- a/app/assets/javascripts/boards/components/board_list_header.vue +++ b/app/assets/javascripts/boards/components/board_list_header.vue @@ -263,7 +263,7 @@ export default { > <h3 :class="{ - 'user-can-drag': userCanDrag, + 'gl-cursor-grab': userCanDrag, 'gl-py-3 gl-h-full': list.collapsed && !isSwimlanesHeader, 'gl-border-b-0': list.collapsed || isSwimlanesHeader, 'gl-py-2': list.collapsed && isSwimlanesHeader, diff --git a/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue b/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue index e77aadfa50e..9d19fe57e7a 100644 --- a/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue +++ b/app/assets/javascripts/boards/components/sidebar/board_sidebar_title.vue @@ -150,7 +150,7 @@ export default { <div class="gl-display-flex gl-w-full gl-justify-content-space-between gl-mt-5"> <gl-button - variant="success" + variant="confirm" size="small" data-testid="submit-button" :disabled="!title" diff --git a/app/assets/javascripts/boards/constants.js b/app/assets/javascripts/boards/constants.js index 851b5eca40d..0f290f566ba 100644 --- a/app/assets/javascripts/boards/constants.js +++ b/app/assets/javascripts/boards/constants.js @@ -50,10 +50,13 @@ export const toggleFormEventPrefix = { issue: 'toggle-issue-form-', }; +export const active = 'active'; + export const inactiveId = 0; export const ISSUABLE = 'issuable'; export const LIST = 'list'; +export const INCIDENT = 'INCIDENT'; export const flashAnimationDuration = 2000; @@ -119,6 +122,7 @@ export const FilterFields = { /* eslint-disable @gitlab/require-i18n-strings */ export const AssigneeFilterType = { any: 'Any', + none: 'None', }; export const MilestoneFilterType = { diff --git a/app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql b/app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql index 0963b3fbfaa..6fe8bb799d6 100644 --- a/app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql +++ b/app/assets/javascripts/boards/graphql/group_board_milestones.query.graphql @@ -1,7 +1,7 @@ -query GroupBoardMilestones($fullPath: ID!, $searchTerm: String) { +query GroupBoardMilestones($fullPath: ID!, $searchTerm: String, $state: MilestoneStateEnum) { group(fullPath: $fullPath) { id - milestones(includeAncestors: true, searchTitle: $searchTerm) { + milestones(includeAncestors: true, searchTitle: $searchTerm, state: $state) { nodes { id title diff --git a/app/assets/javascripts/boards/graphql/issue.fragment.graphql b/app/assets/javascripts/boards/graphql/issue.fragment.graphql index 314faae89f8..53fe6fdc59e 100644 --- a/app/assets/javascripts/boards/graphql/issue.fragment.graphql +++ b/app/assets/javascripts/boards/graphql/issue.fragment.graphql @@ -1,35 +1,6 @@ -#import "~/graphql_shared/fragments/milestone.fragment.graphql" -#import "~/graphql_shared/fragments/user.fragment.graphql" +#import "~/graphql_shared/fragments/issue.fragment.graphql" -fragment IssueNode on Issue { +fragment Issue on Issue { id - iid - title - referencePath: reference(full: true) - dueDate - timeEstimate - totalTimeSpent - humanTimeEstimate - humanTotalTimeSpent - emailsDisabled - confidential - hidden - webUrl - relativePosition - milestone { - ...MilestoneFragment - } - assignees { - nodes { - ...User - } - } - labels { - nodes { - id - title - color - description - } - } + ...IssueNode } diff --git a/app/assets/javascripts/boards/graphql/issue_create.mutation.graphql b/app/assets/javascripts/boards/graphql/issue_create.mutation.graphql index c1a2361a4e8..643d5dcfe4c 100644 --- a/app/assets/javascripts/boards/graphql/issue_create.mutation.graphql +++ b/app/assets/javascripts/boards/graphql/issue_create.mutation.graphql @@ -3,7 +3,7 @@ mutation CreateIssue($input: CreateIssueInput!) { createIssue(input: $input) { issue { - ...IssueNode + ...Issue } errors } diff --git a/app/assets/javascripts/boards/graphql/issue_move_list.mutation.graphql b/app/assets/javascripts/boards/graphql/issue_move_list.mutation.graphql index 570731ecac6..1658cf09085 100644 --- a/app/assets/javascripts/boards/graphql/issue_move_list.mutation.graphql +++ b/app/assets/javascripts/boards/graphql/issue_move_list.mutation.graphql @@ -21,7 +21,7 @@ mutation issueMoveList( } ) { issue { - ...IssueNode + ...Issue } errors } diff --git a/app/assets/javascripts/boards/graphql/lists_issues.query.graphql b/app/assets/javascripts/boards/graphql/lists_issues.query.graphql index 105f2931caa..994ea894be3 100644 --- a/app/assets/javascripts/boards/graphql/lists_issues.query.graphql +++ b/app/assets/javascripts/boards/graphql/lists_issues.query.graphql @@ -22,7 +22,7 @@ query BoardListsEE( issues(first: $first, filters: $filters, after: $after) { edges { node { - ...IssueNode + ...Issue } } pageInfo { @@ -46,7 +46,7 @@ query BoardListsEE( issues(first: $first, filters: $filters, after: $after) { edges { node { - ...IssueNode + ...Issue } } pageInfo { diff --git a/app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql b/app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql index e456823d78a..d917c7e809d 100644 --- a/app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql +++ b/app/assets/javascripts/boards/graphql/project_board_milestones.query.graphql @@ -1,7 +1,7 @@ -query ProjectBoardMilestones($fullPath: ID!, $searchTerm: String) { +query ProjectBoardMilestones($fullPath: ID!, $searchTerm: String, $state: MilestoneStateEnum) { project(fullPath: $fullPath) { id - milestones(searchTitle: $searchTerm, includeAncestors: true) { + milestones(searchTitle: $searchTerm, includeAncestors: true, state: $state) { nodes { id title diff --git a/app/assets/javascripts/boards/stores/actions.js b/app/assets/javascripts/boards/stores/actions.js index 1ebfcfc331b..48ca3239cfd 100644 --- a/app/assets/javascripts/boards/stores/actions.js +++ b/app/assets/javascripts/boards/stores/actions.js @@ -15,6 +15,7 @@ import { FilterFields, ListTypeTitles, DraggableItemTypes, + active, } from 'ee_else_ce/boards/constants'; import { formatIssueInput, @@ -209,6 +210,7 @@ export default { const variables = { fullPath, searchTerm, + state: active, }; let query; |