Commit e9d7d8aa authored by Adam Hegyi's avatar Adam Hegyi

Remove release filter from Issues Analytics

parent 9fe7b97d
import IssuableFilteredSearchTokenKeys from 'ee_else_ce/filtered_search/issuable_filtered_search_token_keys'; 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 FilteredSearchManager from '~/filtered_search/filtered_search_manager';
import { historyPushState } from '~/lib/utils/common_utils'; import { historyPushState } from '~/lib/utils/common_utils';
import issueAnalyticsStore from './stores'; import issueAnalyticsStore from './stores';
const EXCLUDED_TOKENS = ['release'];
export default class FilteredSearchIssueAnalytics extends FilteredSearchManager { export default class FilteredSearchIssueAnalytics extends FilteredSearchManager {
constructor() { 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({ super({
page: 'issues_analytics', page: 'issues_analytics',
isGroupDecendent: true, isGroupDecendent: true,
stateFiltersSelector: '.issues-state-filters', stateFiltersSelector: '.issues-state-filters',
isGroup: true, isGroup: true,
filteredSearchTokenKeys: IssuableFilteredSearchTokenKeys, filteredSearchTokenKeys: issuesAnalyticsTokenKeys,
}); });
this.isHandledAsync = true; 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