Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 12:10:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 12:10:16 +0300
commitf7e83434e312ca6cf598c6d815fe32dc200e3056 (patch)
tree6dea7e31efe17b26f88e497a59aadc9d7576b6ea /app/assets/javascripts
parente9ae9c5f2ee47b084038ff62319504fc6d0abf20 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/boards/components/board_filtered_search.vue22
-rw-r--r--app/assets/javascripts/boards/components/issue_board_filtered_search.vue20
-rw-r--r--app/assets/javascripts/boards/stores/actions.js1
-rw-r--r--app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue8
-rw-r--r--app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue2
5 files changed, 29 insertions, 24 deletions
diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue
index 6e6ada2d109..6fa5f018875 100644
--- a/app/assets/javascripts/boards/components/board_filtered_search.vue
+++ b/app/assets/javascripts/boards/components/board_filtered_search.vue
@@ -39,6 +39,7 @@ export default {
assigneeUsername,
search,
milestoneTitle,
+ iterationId,
types,
weight,
epicId,
@@ -83,6 +84,13 @@ export default {
});
}
+ if (iterationId) {
+ filteredSearchValue.push({
+ type: 'iteration',
+ value: { data: iterationId, operator: '=' },
+ });
+ }
+
if (weight) {
filteredSearchValue.push({
type: 'weight',
@@ -118,6 +126,13 @@ export default {
});
}
+ if (this.filterParams['not[iteration_id]']) {
+ filteredSearchValue.push({
+ type: 'iteration_id',
+ value: { data: this.filterParams['not[iteration_id]'], operator: '!=' },
+ });
+ }
+
if (this.filterParams['not[weight]']) {
filteredSearchValue.push({
type: 'weight',
@@ -179,8 +194,8 @@ export default {
weight,
epicId,
myReactionEmoji,
+ iterationId,
} = this.filterParams;
-
let notParams = {};
if (Object.prototype.hasOwnProperty.call(this.filterParams, 'not')) {
@@ -194,6 +209,7 @@ export default {
'not[weight]': this.filterParams.not.weight,
'not[epic_id]': this.filterParams.not.epicId,
'not[my_reaction_emoji]': this.filterParams.not.myReactionEmoji,
+ 'not[iteration_id]': this.filterParams.not.iterationId,
},
undefined,
);
@@ -205,6 +221,7 @@ export default {
'label_name[]': labelName,
assignee_username: assigneeUsername,
milestone_title: milestoneTitle,
+ iteration_id: iterationId,
search,
types,
weight,
@@ -261,6 +278,9 @@ export default {
case 'milestone_title':
filterParams.milestoneTitle = filter.value.data;
break;
+ case 'iteration':
+ filterParams.iterationId = filter.value.data;
+ break;
case 'weight':
filterParams.weight = filter.value.data;
break;
diff --git a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
index bdb9c2be836..c20b5e3f377 100644
--- a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
+++ b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
@@ -12,6 +12,7 @@ import { __ } from '~/locale';
import {
DEFAULT_MILESTONES_GRAPHQL,
TOKEN_TITLE_MY_REACTION,
+ OPERATOR_IS_AND_IS_NOT,
} from '~/vue_shared/components/filtered_search_bar/constants';
import AuthorToken from '~/vue_shared/components/filtered_search_bar/tokens/author_token.vue';
import EmojiToken from '~/vue_shared/components/filtered_search_bar/tokens/emoji_token.vue';
@@ -35,8 +36,6 @@ export default {
issue: __('Issue'),
milestone: __('Milestone'),
weight: __('Weight'),
- is: __('is'),
- isNot: __('is not'),
},
components: { BoardFilteredSearch },
inject: ['isSignedIn'],
@@ -62,8 +61,6 @@ export default {
tokensCE() {
const {
label,
- is,
- isNot,
author,
assignee,
issue,
@@ -84,10 +81,7 @@ export default {
icon: 'user',
title: assignee,
type: 'assignee_username',
- operators: [
- { value: '=', description: is },
- { value: '!=', description: isNot },
- ],
+ operators: OPERATOR_IS_AND_IS_NOT,
token: AuthorToken,
unique: true,
fetchAuthors,
@@ -97,10 +91,7 @@ export default {
icon: 'pencil',
title: author,
type: 'author_username',
- operators: [
- { value: '=', description: is },
- { value: '!=', description: isNot },
- ],
+ operators: OPERATOR_IS_AND_IS_NOT,
symbol: '@',
token: AuthorToken,
unique: true,
@@ -111,10 +102,7 @@ export default {
icon: 'labels',
title: label,
type: 'label_name',
- operators: [
- { value: '=', description: is },
- { value: '!=', description: isNot },
- ],
+ operators: OPERATOR_IS_AND_IS_NOT,
token: LabelToken,
unique: false,
symbol: '~',
diff --git a/app/assets/javascripts/boards/stores/actions.js b/app/assets/javascripts/boards/stores/actions.js
index 3a96e535cf7..5a111cdf81b 100644
--- a/app/assets/javascripts/boards/stores/actions.js
+++ b/app/assets/javascripts/boards/stores/actions.js
@@ -373,7 +373,6 @@ export default {
commit(types.REQUEST_ITEMS_FOR_LIST, { listId, fetchNext });
const { fullPath, fullBoardId, boardType, filterParams } = state;
-
const variables = {
fullPath,
boardId: fullBoardId,
diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue
index aff93ebc9c0..4a1dbf9d3fe 100644
--- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue
+++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/iteration_token.vue
@@ -1,7 +1,6 @@
<script>
import { GlDropdownDivider, GlDropdownSectionHeader, GlFilteredSearchSuggestion } from '@gitlab/ui';
import createFlash from '~/flash';
-import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { __ } from '~/locale';
import BaseToken from '~/vue_shared/components/filtered_search_bar/tokens/base_token.vue';
import { formatDate } from '~/lib/utils/datetime_utility';
@@ -43,7 +42,7 @@ export default {
},
methods: {
getActiveIteration(iterations, data) {
- return iterations.find((iteration) => this.getValue(iteration) === data);
+ return iterations.find((iteration) => iteration.id === data);
},
groupIterationsByCadence(iterations) {
const cadences = [];
@@ -80,9 +79,6 @@ export default {
this.loading = false;
});
},
- getValue(iteration) {
- return String(getIdFromGraphQLId(iteration.id));
- },
/**
* TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/344619
* This method also exists as a utility function in ee/../iterations/utils.js
@@ -125,7 +121,7 @@ export default {
<gl-filtered-search-suggestion
v-for="iteration in cadence.iterations"
:key="iteration.id"
- :value="getValue(iteration)"
+ :value="iteration.id"
>
{{ iteration.title }}
<div v-if="glFeatures.iterationCadences" class="gl-text-gray-400">
diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
index 4234bc72f3a..7e259cb8b96 100644
--- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
+++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
@@ -179,6 +179,8 @@ export default {
document.addEventListener('mousedown', this.handleDocumentMousedown);
document.addEventListener('click', this.handleDocumentClick);
+
+ this.updateLabelsSetState();
},
beforeDestroy() {
document.removeEventListener('mousedown', this.handleDocumentMousedown);