Commit b5a559ae authored by Justin Ho's avatar Justin Ho Committed by Natalia Tepluhina

Migrate urlParamsToObject to queryToObject

Reduce technical debt in Jira issues list app.

We need to use the `gatherArrays` options since we still use
the Rails syntax for labels like this `labels[]=`.
parent 3b92e141
......@@ -2,8 +2,7 @@ import Vue from 'vue';
import { IssuableStates } from '~/issuable_list/constants';
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
// eslint-disable-next-line import/no-deprecated
import { urlParamsToObject } from '~/lib/utils/url_utility';
import { queryToObject } from '~/lib/utils/url_utility';
import JiraIssuesListApp from './components/jira_issues_list_root.vue';
import apolloProvider from './graphql';
......@@ -22,10 +21,12 @@ export default function initJiraIssuesList({ mountPointSelector }) {
} = mountPointEl.dataset;
const initialFilterParams = Object.assign(
// eslint-disable-next-line import/no-deprecated
convertObjectPropsToCamelCase(urlParamsToObject(window.location.search.substring(1)), {
convertObjectPropsToCamelCase(
queryToObject(window.location.search.substring(1), { gatherArrays: true }),
{
dropKeys: ['scope', 'utf8', 'state', 'sort'], // These keys are unsupported/unnecessary
}),
},
),
);
return new Vue({
......
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