diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 13:00:54 +0300 |
commit | 3cccd102ba543e02725d247893729e5c73b38295 (patch) | |
tree | f36a04ec38517f5deaaacb5acc7d949688d1e187 /app/assets/javascripts/boards/components/board_filtered_search.vue | |
parent | 205943281328046ef7b4528031b90fbda70c75ac (diff) |
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/components/board_filtered_search.vue')
-rw-r--r-- | app/assets/javascripts/boards/components/board_filtered_search.vue | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue index 95d4fd5bc0a..aeb2cee590d 100644 --- a/app/assets/javascripts/boards/components/board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/board_filtered_search.vue @@ -4,7 +4,10 @@ import { mapActions } from 'vuex'; import { getIdFromGraphQLId, isGid } from '~/graphql_shared/utils'; import { updateHistory, setUrlParams } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; -import { FILTERED_SEARCH_TERM } from '~/vue_shared/components/filtered_search_bar/constants'; +import { + FILTERED_SEARCH_TERM, + FILTER_ANY, +} 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'; @@ -42,6 +45,7 @@ export default { search, milestoneTitle, iterationId, + iterationCadenceId, types, weight, epicId, @@ -95,10 +99,20 @@ export default { }); } - if (iterationId) { + let iterationData = null; + + if (iterationId && iterationCadenceId) { + iterationData = `${iterationId}&${iterationCadenceId}`; + } else if (iterationCadenceId) { + iterationData = `${FILTER_ANY}&${iterationCadenceId}`; + } else if (iterationId) { + iterationData = iterationId; + } + + if (iterationData) { filteredSearchValue.push({ type: 'iteration', - value: { data: iterationId, operator: '=' }, + value: { data: iterationData, operator: '=' }, }); } @@ -228,9 +242,12 @@ export default { epicId, myReactionEmoji, iterationId, + iterationCadenceId, releaseTag, confidential, } = this.filterParams; + let iteration = iterationId; + let cadence = iterationCadenceId; let notParams = {}; if (Object.prototype.hasOwnProperty.call(this.filterParams, 'not')) { @@ -251,6 +268,10 @@ export default { ); } + if (iterationId?.includes('&')) { + [iteration, cadence] = iterationId.split('&'); + } + return mapValues( { ...notParams, @@ -259,7 +280,8 @@ export default { assignee_username: assigneeUsername, assignee_id: assigneeId, milestone_title: milestoneTitle, - iteration_id: iterationId, + iteration_id: iteration, + iteration_cadence_id: cadence, search, types, weight, |