diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 10:34:06 +0000 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/boards/boards_util.js | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) | |
download | gitlab-ce-859a6fb938bb9ee2a317c46dfa4fcc1af49608f0.tar.gz |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/boards_util.js')
-rw-r--r-- | app/assets/javascripts/boards/boards_util.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/assets/javascripts/boards/boards_util.js b/app/assets/javascripts/boards/boards_util.js index 965d3571f42..13ad820477f 100644 --- a/app/assets/javascripts/boards/boards_util.js +++ b/app/assets/javascripts/boards/boards_util.js @@ -1,6 +1,6 @@ import { sortBy } from 'lodash'; -import { ListType } from './constants'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; +import { ListType, NOT_FILTER } from './constants'; export function getMilestone() { return null; @@ -144,6 +144,17 @@ export function isListDraggable(list) { return list.listType !== ListType.backlog && list.listType !== ListType.closed; } +export function transformNotFilters(filters) { + return Object.keys(filters) + .filter((key) => key.startsWith(NOT_FILTER)) + .reduce((obj, key) => { + return { + ...obj, + [key.substring(4, key.length - 1)]: filters[key], + }; + }, {}); +} + // EE-specific feature. Find the implementation in the `ee/`-folder export function transformBoardConfig() { return ''; @@ -157,4 +168,5 @@ export default { fullLabelId, fullIterationId, isListDraggable, + transformNotFilters, }; |