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
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-08-07 06:08:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-08-07 06:08:35 +0300
commit84ac2a3fcdaa8df2c35c54b1738d8e943263d4bb (patch)
tree47fad9c207aec9b3d8fdd779134bdcae07602a2e /app
parent4e4519f1f8ee22cca599a8d9b7f7dbc7a9764052 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/boards/boards_util.js3
-rw-r--r--app/assets/javascripts/boards/components/board_filtered_search.vue21
-rw-r--r--app/assets/javascripts/boards/components/issue_board_filtered_search.vue33
-rw-r--r--app/assets/javascripts/boards/constants.js1
4 files changed, 57 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/boards_util.js b/app/assets/javascripts/boards/boards_util.js
index 46f97e09385..3219d74f85f 100644
--- a/app/assets/javascripts/boards/boards_util.js
+++ b/app/assets/javascripts/boards/boards_util.js
@@ -204,6 +204,9 @@ export const FiltersInfo = {
releaseTag: {
negatedSupport: true,
},
+ types: {
+ negatedSupport: true,
+ },
search: {
negatedSupport: false,
},
diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue
index baefac572f1..20f5207bd47 100644
--- a/app/assets/javascripts/boards/components/board_filtered_search.vue
+++ b/app/assets/javascripts/boards/components/board_filtered_search.vue
@@ -33,6 +33,7 @@ export default {
assigneeUsername,
search,
milestoneTitle,
+ types,
} = this.filterParams;
let notParams = {};
@@ -42,6 +43,7 @@ export default {
'not[label_name][]': this.filterParams.not.labelName,
'not[author_username]': this.filterParams.not.authorUsername,
'not[assignee_username]': this.filterParams.not.assigneeUsername,
+ 'not[types]': this.filterParams.not.types,
'not[milestone_title]': this.filterParams.not.milestoneTitle,
},
undefined,
@@ -55,6 +57,7 @@ export default {
assignee_username: assigneeUsername,
milestone_title: milestoneTitle,
search,
+ types,
};
},
},
@@ -78,6 +81,7 @@ export default {
assigneeUsername,
search,
milestoneTitle,
+ types,
} = this.filterParams;
const filteredSearchValue = [];
@@ -95,6 +99,13 @@ export default {
});
}
+ if (types) {
+ filteredSearchValue.push({
+ type: 'types',
+ value: { data: types, operator: '=' },
+ });
+ }
+
if (labelName?.length) {
filteredSearchValue.push(
...labelName.map((label) => ({
@@ -141,6 +152,13 @@ export default {
);
}
+ if (this.filterParams['not[types]']) {
+ filteredSearchValue.push({
+ type: 'types',
+ value: { data: this.filterParams['not[types]'], operator: '!=' },
+ });
+ }
+
if (search) {
filteredSearchValue.push(search);
}
@@ -168,6 +186,9 @@ export default {
case 'assignee_username':
filterParams.assigneeUsername = filter.value.data;
break;
+ case 'types':
+ filterParams.types = filter.value.data;
+ break;
case 'label_name':
labels.push(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 22099f695ee..42ae6b04a0e 100644
--- a/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
+++ b/app/assets/javascripts/boards/components/issue_board_filtered_search.vue
@@ -1,4 +1,5 @@
<script>
+import { GlFilteredSearchToken } from '@gitlab/ui';
import { mapActions } from 'vuex';
import BoardFilteredSearch from '~/boards/components/board_filtered_search.vue';
import issueBoardFilters from '~/boards/issue_board_filters';
@@ -10,11 +11,18 @@ import LabelToken from '~/vue_shared/components/filtered_search_bar/tokens/label
import MilestoneToken from '~/vue_shared/components/filtered_search_bar/tokens/milestone_token.vue';
export default {
+ types: {
+ ISSUE: 'ISSUE',
+ INCIDENT: 'INCIDENT',
+ },
i18n: {
search: __('Search'),
label: __('Label'),
author: __('Author'),
assignee: __('Assignee'),
+ type: __('Type'),
+ incident: __('Incident'),
+ issue: __('Issue'),
milestone: __('Milestone'),
is: __('is'),
isNot: __('is not'),
@@ -32,7 +40,18 @@ export default {
},
computed: {
tokens() {
- const { label, is, isNot, author, assignee, milestone } = this.$options.i18n;
+ const {
+ label,
+ is,
+ isNot,
+ author,
+ assignee,
+ issue,
+ incident,
+ type,
+ milestone,
+ } = this.$options.i18n;
+ const { types } = this.$options;
const { fetchAuthors, fetchLabels } = issueBoardFilters(
this.$apollo,
this.fullPath,
@@ -81,6 +100,18 @@ export default {
preloadedAuthors: this.preloadedAuthors(),
},
{
+ icon: 'issues',
+ title: type,
+ type: 'types',
+ operators: [{ value: '=', description: is }],
+ token: GlFilteredSearchToken,
+ unique: true,
+ options: [
+ { icon: 'issue-type-issue', value: types.ISSUE, title: issue },
+ { icon: 'issue-type-incident', value: types.INCIDENT, title: incident },
+ ],
+ },
+ {
type: 'milestone_title',
title: milestone,
icon: 'clock',
diff --git a/app/assets/javascripts/boards/constants.js b/app/assets/javascripts/boards/constants.js
index 21ef70582a4..6a5492f211c 100644
--- a/app/assets/javascripts/boards/constants.js
+++ b/app/assets/javascripts/boards/constants.js
@@ -109,6 +109,7 @@ export const FilterFields = {
'myReactionEmoji',
'releaseTag',
'search',
+ 'types',
],
};