Commit e1bf3c99 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'cngo-delete-due-date-issues-list' into 'master'

Delete due_date parameter on issues list refactor

See merge request gitlab-org/gitlab!80316
parents 3244aa8e cb4a83a4
...@@ -41,7 +41,6 @@ import { ...@@ -41,7 +41,6 @@ import {
i18n, i18n,
MAX_LIST_SIZE, MAX_LIST_SIZE,
PAGE_SIZE, PAGE_SIZE,
PARAM_DUE_DATE,
PARAM_STATE, PARAM_STATE,
RELATIVE_POSITION_ASC, RELATIVE_POSITION_ASC,
TOKEN_TYPE_ASSIGNEE, TOKEN_TYPE_ASSIGNEE,
...@@ -65,7 +64,6 @@ import { ...@@ -65,7 +64,6 @@ import {
convertToApiParams, convertToApiParams,
convertToSearchQuery, convertToSearchQuery,
convertToUrlParams, convertToUrlParams,
getDueDateValue,
getFilterTokens, getFilterTokens,
getInitialPageParams, getInitialPageParams,
getSortKey, getSortKey,
...@@ -161,7 +159,6 @@ export default { ...@@ -161,7 +159,6 @@ export default {
} }
return { return {
dueDateFilter: getDueDateValue(getParameterByName(PARAM_DUE_DATE)),
exportCsvPathWithQuery: this.getExportCsvPathWithQuery(), exportCsvPathWithQuery: this.getExportCsvPathWithQuery(),
filterTokens: isSearchDisabled ? [] : getFilterTokens(window.location.search), filterTokens: isSearchDisabled ? [] : getFilterTokens(window.location.search),
issues: [], issues: [],
...@@ -391,7 +388,6 @@ export default { ...@@ -391,7 +388,6 @@ export default {
}, },
urlParams() { urlParams() {
return { return {
due_date: this.dueDateFilter,
search: this.searchQuery, search: this.searchQuery,
sort: urlSortParams[this.sortKey], sort: urlSortParams[this.sortKey],
state: this.state, state: this.state,
......
...@@ -55,8 +55,6 @@ export const i18n = { ...@@ -55,8 +55,6 @@ export const i18n = {
export const MAX_LIST_SIZE = 10; export const MAX_LIST_SIZE = 10;
export const PAGE_SIZE = 20; export const PAGE_SIZE = 20;
export const PAGE_SIZE_MANUAL = 100; export const PAGE_SIZE_MANUAL = 100;
export const PARAM_DUE_DATE = 'due_date';
export const PARAM_SORT = 'sort';
export const PARAM_STATE = 'state'; export const PARAM_STATE = 'state';
export const RELATIVE_POSITION = 'relative_position'; export const RELATIVE_POSITION = 'relative_position';
...@@ -68,21 +66,6 @@ export const largePageSizeParams = { ...@@ -68,21 +66,6 @@ export const largePageSizeParams = {
firstPageSize: PAGE_SIZE_MANUAL, firstPageSize: PAGE_SIZE_MANUAL,
}; };
export const DUE_DATE_NONE = '0';
export const DUE_DATE_ANY = '';
export const DUE_DATE_OVERDUE = 'overdue';
export const DUE_DATE_WEEK = 'week';
export const DUE_DATE_MONTH = 'month';
export const DUE_DATE_NEXT_MONTH_AND_PREVIOUS_TWO_WEEKS = 'next_month_and_previous_two_weeks';
export const DUE_DATE_VALUES = [
DUE_DATE_NONE,
DUE_DATE_ANY,
DUE_DATE_OVERDUE,
DUE_DATE_WEEK,
DUE_DATE_MONTH,
DUE_DATE_NEXT_MONTH_AND_PREVIOUS_TWO_WEEKS,
];
export const BLOCKING_ISSUES_ASC = 'BLOCKING_ISSUES_ASC'; export const BLOCKING_ISSUES_ASC = 'BLOCKING_ISSUES_ASC';
export const BLOCKING_ISSUES_DESC = 'BLOCKING_ISSUES_DESC'; export const BLOCKING_ISSUES_DESC = 'BLOCKING_ISSUES_DESC';
export const CREATED_ASC = 'CREATED_ASC'; export const CREATED_ASC = 'CREATED_ASC';
......
...@@ -13,7 +13,6 @@ import { ...@@ -13,7 +13,6 @@ import {
defaultPageSizeParams, defaultPageSizeParams,
DUE_DATE_ASC, DUE_DATE_ASC,
DUE_DATE_DESC, DUE_DATE_DESC,
DUE_DATE_VALUES,
filters, filters,
LABEL_PRIORITY_ASC, LABEL_PRIORITY_ASC,
LABEL_PRIORITY_DESC, LABEL_PRIORITY_DESC,
...@@ -52,8 +51,6 @@ export const getSortKey = (sort) => ...@@ -52,8 +51,6 @@ export const getSortKey = (sort) =>
export const isSortKey = (sort) => Object.keys(urlSortParams).includes(sort); export const isSortKey = (sort) => Object.keys(urlSortParams).includes(sort);
export const getDueDateValue = (value) => (DUE_DATE_VALUES.includes(value) ? value : undefined);
export const getSortOptions = (hasIssueWeightsFeature, hasBlockedIssuesFeature) => { export const getSortOptions = (hasIssueWeightsFeature, hasBlockedIssuesFeature) => {
const sortOptions = [ const sortOptions = [
{ {
......
...@@ -30,8 +30,6 @@ import IssuesListApp from '~/issues/list/components/issues_list_app.vue'; ...@@ -30,8 +30,6 @@ import IssuesListApp from '~/issues/list/components/issues_list_app.vue';
import NewIssueDropdown from '~/issues/list/components/new_issue_dropdown.vue'; import NewIssueDropdown from '~/issues/list/components/new_issue_dropdown.vue';
import { import {
CREATED_DESC, CREATED_DESC,
DUE_DATE_OVERDUE,
PARAM_DUE_DATE,
RELATIVE_POSITION, RELATIVE_POSITION,
RELATIVE_POSITION_ASC, RELATIVE_POSITION_ASC,
TOKEN_TYPE_ASSIGNEE, TOKEN_TYPE_ASSIGNEE,
...@@ -296,16 +294,6 @@ describe('CE IssuesListApp component', () => { ...@@ -296,16 +294,6 @@ describe('CE IssuesListApp component', () => {
}); });
describe('initial url params', () => { describe('initial url params', () => {
describe('due_date', () => {
it('is set from the url params', () => {
setWindowLocation(`?${PARAM_DUE_DATE}=${DUE_DATE_OVERDUE}`);
wrapper = mountComponent();
expect(findIssuableList().props('urlParams')).toMatchObject({ due_date: DUE_DATE_OVERDUE });
});
});
describe('search', () => { describe('search', () => {
it('is set from the url params', () => { it('is set from the url params', () => {
setWindowLocation(locationSearch); setWindowLocation(locationSearch);
......
...@@ -10,7 +10,6 @@ import { ...@@ -10,7 +10,6 @@ import {
} from 'jest/issues/list/mock_data'; } from 'jest/issues/list/mock_data';
import { import {
defaultPageSizeParams, defaultPageSizeParams,
DUE_DATE_VALUES,
largePageSizeParams, largePageSizeParams,
RELATIVE_POSITION_ASC, RELATIVE_POSITION_ASC,
urlSortParams, urlSortParams,
...@@ -19,7 +18,6 @@ import { ...@@ -19,7 +18,6 @@ import {
convertToApiParams, convertToApiParams,
convertToSearchQuery, convertToSearchQuery,
convertToUrlParams, convertToUrlParams,
getDueDateValue,
getFilterTokens, getFilterTokens,
getInitialPageParams, getInitialPageParams,
getSortKey, getSortKey,
...@@ -56,16 +54,6 @@ describe('isSortKey', () => { ...@@ -56,16 +54,6 @@ describe('isSortKey', () => {
}); });
}); });
describe('getDueDateValue', () => {
it.each(DUE_DATE_VALUES)('returns the argument when it is `%s`', (value) => {
expect(getDueDateValue(value)).toBe(value);
});
it('returns undefined when the argument is invalid', () => {
expect(getDueDateValue('invalid value')).toBeUndefined();
});
});
describe('getSortOptions', () => { describe('getSortOptions', () => {
describe.each` describe.each`
hasIssueWeightsFeature | hasBlockedIssuesFeature | length | containsWeight | containsBlocking hasIssueWeightsFeature | hasBlockedIssuesFeature | length | containsWeight | containsBlocking
......
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