diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-17 09:11:37 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-17 09:11:37 +0300 |
commit | 4cb45018de85caf62c6338988d6a48b8466abdfd (patch) | |
tree | c74d646ac356412320f5f4a672f6b3fd9c8b2e6c | |
parent | eac5de031737387f9e00be37ae429a426fe7d19d (diff) |
Add latest changes from gitlab-org/gitlab@master
4 files changed, 55 insertions, 21 deletions
diff --git a/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md index 7fac499fd18..08049daab22 100644 --- a/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md +++ b/.gitlab/issue_templates/Pipeline Authoring Issue Implementation.md @@ -12,6 +12,8 @@ ## Proposal +## Confirm purpose and User Reception (how does this benefit the user?) + ## Additional details <!-- _NOTE: If the issue has addressed all of these questions, this separate section can be removed._ diff --git a/app/assets/javascripts/boards/components/board_filtered_search.vue b/app/assets/javascripts/boards/components/board_filtered_search.vue index 91dd5c81f77..9443154999b 100644 --- a/app/assets/javascripts/boards/components/board_filtered_search.vue +++ b/app/assets/javascripts/boards/components/board_filtered_search.vue @@ -2,7 +2,7 @@ import { pickBy, isEmpty, mapValues } from 'lodash'; // eslint-disable-next-line no-restricted-imports import { mapActions } from 'vuex'; -import { getIdFromGraphQLId, isGid, convertToGraphQLId } from '~/graphql_shared/utils'; +import { getIdFromGraphQLId, isGid } from '~/graphql_shared/utils'; import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; import { updateHistory, setUrlParams, queryToObject } from '~/lib/utils/url_utility'; import { __ } from '~/locale'; @@ -24,7 +24,6 @@ import { } from '~/vue_shared/components/filtered_search_bar/constants'; import FilteredSearch from '~/vue_shared/components/filtered_search_bar/filtered_search_bar_root.vue'; import { AssigneeFilterType, GroupByParamType } from 'ee_else_ce/boards/constants'; -import { TYPENAME_ITERATION } from '~/graphql_shared/constants'; import eventHub from '../eventhub'; export default { @@ -342,18 +341,6 @@ export default { }, ); }, - formattedFilterParams() { - const rawFilterParams = queryToObject(window.location.search, { gatherArrays: true }); - const filtersCopy = convertObjectPropsToCamelCase(rawFilterParams, {}); - if (this.filterParams?.iterationId) { - filtersCopy.iterationId = convertToGraphQLId( - TYPENAME_ITERATION, - this.filterParams.iterationId, - ); - } - - return filtersCopy; - }, }, created() { eventHub.$on('updateTokens', this.updateTokens); @@ -367,10 +354,15 @@ export default { }, methods: { ...mapActions(['performSearch']), - updateTokens() { + formattedFilterParams() { const rawFilterParams = queryToObject(window.location.search, { gatherArrays: true }); - this.filterParams = convertObjectPropsToCamelCase(rawFilterParams, {}); - this.$emit('setFilters', this.formattedFilterParams); + const filtersCopy = convertObjectPropsToCamelCase(rawFilterParams, {}); + this.filterParams = filtersCopy; + + return filtersCopy; + }, + updateTokens() { + this.$emit('setFilters', this.formattedFilterParams()); this.filteredSearchKey += 1; }, handleFilter(filters) { @@ -383,7 +375,7 @@ export default { }); if (this.isApolloBoard) { - this.$emit('setFilters', this.formattedFilterParams); + this.$emit('setFilters', this.formattedFilterParams()); } else { this.performSearch(); } diff --git a/doc/security/identity_verification.md b/doc/security/identity_verification.md index b6932d88820..d87ad37c94c 100644 --- a/doc/security/identity_verification.md +++ b/doc/security/identity_verification.md @@ -42,4 +42,4 @@ You cannot verify an account with a credit card number associated with a banned ## Related topics - [Identity verification development documentation](../development/identity_verification.md) -- [Changing risk assessment support](https://about.gitlab.com/handbook/support/workflows/reinstating-blocked-accounts.html#change-risk-assessment-credit-card-verification) +- [Changing risk assessment support](https://handbook.gitlab.com/handbook/support/workflows/reinstating-blocked-accounts/#change-risk-assessment-credit-card-verification) diff --git a/spec/frontend/boards/components/board_filtered_search_spec.js b/spec/frontend/boards/components/board_filtered_search_spec.js index 0bd936c9abd..e0d865ada20 100644 --- a/spec/frontend/boards/components/board_filtered_search_spec.js +++ b/spec/frontend/boards/components/board_filtered_search_spec.js @@ -65,7 +65,12 @@ describe('BoardFilteredSearch', () => { const createComponent = ({ initialFilterParams = {}, props = {}, provide = {} } = {}) => { store = createStore(); wrapper = shallowMount(BoardFilteredSearch, { - provide: { initialFilterParams, fullPath: '', isApolloBoard: false, ...provide }, + provide: { + initialFilterParams, + fullPath: '', + isApolloBoard: false, + ...provide, + }, store, propsData: { ...props, @@ -107,7 +112,7 @@ describe('BoardFilteredSearch', () => { }); describe('when eeFilters is not empty', () => { - it('passes the correct initialFilterValue to FitleredSearchBarRoot', () => { + it('passes the correct initialFilterValue to FilteredSearchBarRoot', () => { createComponent({ props: { eeFilters: { labelName: ['label'] } } }); expect(findFilteredSearch().props('initialFilterValue')).toEqual([ @@ -209,5 +214,40 @@ describe('BoardFilteredSearch', () => { expect(wrapper.emitted('setFilters')).toHaveLength(1); }); + + describe('when iteration is passed a wildcard value with a cadence id', () => { + const url = (arg) => `http://test.host/?iteration_id=${arg}&iteration_cadence_id=1349`; + + it.each([ + ['Current&1349', url('Current'), 'Current'], + ['Any&1349', url('Any'), 'Any'], + ])('sets the url param %s', (iterationParam, expected, wildCardId) => { + Object.defineProperty(window, 'location', { + writable: true, + value: new URL(expected), + }); + + const mockFilters = [ + { type: TOKEN_TYPE_ITERATION, value: { data: iterationParam, operator: '=' } }, + ]; + + findFilteredSearch().vm.$emit('onFilter', mockFilters); + + expect(updateHistory).toHaveBeenCalledWith({ + title: '', + replace: true, + url: expected, + }); + + expect(wrapper.emitted('setFilters')).toStrictEqual([ + [ + { + iterationCadenceId: '1349', + iterationId: wildCardId, + }, + ], + ]); + }); + }); }); }); |