diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /app/assets/javascripts/issues/list/utils.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/issues/list/utils.js')
-rw-r--r-- | app/assets/javascripts/issues/list/utils.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/issues/list/utils.js b/app/assets/javascripts/issues/list/utils.js index b566e08731c..bbd081843ca 100644 --- a/app/assets/javascripts/issues/list/utils.js +++ b/app/assets/javascripts/issues/list/utils.js @@ -13,6 +13,8 @@ import { TOKEN_TYPE_MILESTONE, TOKEN_TYPE_RELEASE, TOKEN_TYPE_TYPE, + TOKEN_TYPE_HEALTH, + TOKEN_TYPE_LABEL, } from '~/vue_shared/components/filtered_search_bar/constants'; import { ALTERNATIVE_FILTER, @@ -252,8 +254,9 @@ const isSpecialFilter = (type, data) => { const getFilterType = ({ type, value: { data, operator } }) => { const isUnionedAuthor = type === TOKEN_TYPE_AUTHOR && operator === OPERATOR_OR; + const isUnionedLabel = type === TOKEN_TYPE_LABEL && operator === OPERATOR_OR; - if (isUnionedAuthor) { + if (isUnionedAuthor || isUnionedLabel) { return ALTERNATIVE_FILTER; } if (isSpecialFilter(type, data)) { @@ -267,8 +270,13 @@ const wildcardTokens = [TOKEN_TYPE_ITERATION, TOKEN_TYPE_MILESTONE, TOKEN_TYPE_R const isWildcardValue = (tokenType, value) => wildcardTokens.includes(tokenType) && specialFilterValues.includes(value); +const isHealthStatusSpecialFilter = (tokenType, value) => + tokenType === TOKEN_TYPE_HEALTH && specialFilterValues.includes(value); + const requiresUpperCaseValue = (tokenType, value) => - tokenType === TOKEN_TYPE_TYPE || isWildcardValue(tokenType, value); + tokenType === TOKEN_TYPE_TYPE || + isWildcardValue(tokenType, value) || + isHealthStatusSpecialFilter(tokenType, value); const formatData = (token) => { if (requiresUpperCaseValue(token.type, token.value.data)) { |