Commit c567376b authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '208903-remove-release-filter-from-issues-analytics' into 'master'

Remove release filter from Issues Analytics

Closes #208903

See merge request gitlab-org/gitlab!26452
parents 225612bc e9d7d8aa
import IssuableFilteredSearchTokenKeys from 'ee_else_ce/filtered_search/issuable_filtered_search_token_keys';
import FilteredSearchTokenKeys from '~/filtered_search/filtered_search_token_keys';
import FilteredSearchManager from '~/filtered_search/filtered_search_manager';
import { historyPushState } from '~/lib/utils/common_utils';
import issueAnalyticsStore from './stores';
const EXCLUDED_TOKENS = ['release'];
export default class FilteredSearchIssueAnalytics extends FilteredSearchManager {
constructor() {
const issuesAnalyticsTokenKeys = new FilteredSearchTokenKeys(
IssuableFilteredSearchTokenKeys.tokenKeys.filter(({ key }) => !EXCLUDED_TOKENS.includes(key)), // release filter is not working with the Issues API at the moment
IssuableFilteredSearchTokenKeys.alternativeTokenKeys,
IssuableFilteredSearchTokenKeys.conditions,
);
super({
page: 'issues_analytics',
isGroupDecendent: true,
stateFiltersSelector: '.issues-state-filters',
isGroup: true,
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys,
filteredSearchTokenKeys: issuesAnalyticsTokenKeys,
});
this.isHandledAsync = true;
......
---
title: Remove release tag filter from Issues Analytics
merge_request: 208903
author:
type: changed
import FilteredSearchIssueAnalytics from 'ee/issues_analytics/filtered_search_issues_analytics';
describe('FilteredSearchIssueAnalytics', () => {
describe('Token keys', () => {
const fixture = `<div class="filtered-search-box-input-container"><input class="filtered-search" /></div>`;
let component = null;
let availableTokenKeys = null;
beforeEach(() => {
setFixtures(fixture);
component = new FilteredSearchIssueAnalytics();
availableTokenKeys = component.filteredSearchTokenKeys.tokenKeys.map(({ key }) => key);
});
afterEach(() => {
component = null;
});
it.each`
token | available
${'author'} | ${true}
${'assignee'} | ${true}
${'milestone'} | ${true}
${'label'} | ${true}
${'epic'} | ${true}
${'weight'} | ${true}
${'release'} | ${false}
`('includes $token filter $available', ({ token, available }) => {
expect(availableTokenKeys.includes(token)).toBe(available);
});
});
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment