Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
91795547
Commit
91795547
authored
Aug 13, 2018
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't add empty query params to boards
parent
ab56f4ef
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
2 deletions
+11
-2
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+1
-0
ee/app/assets/javascripts/boards/stores/boards_store_ee.js
ee/app/assets/javascripts/boards/stores/boards_store_ee.js
+1
-0
ee/changelogs/unreleased/boards-querystring.yml
ee/changelogs/unreleased/boards-querystring.yml
+5
-0
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+4
-2
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
91795547
...
...
@@ -138,6 +138,7 @@ export const getUrlParamsArray = () =>
window
.
location
.
search
.
slice
(
1
)
.
split
(
'
&
'
)
.
filter
(
param
=>
param
.
length
>
0
)
.
map
(
param
=>
{
const
split
=
param
.
split
(
'
=
'
);
return
[
decodeURI
(
split
[
0
]),
split
[
1
]].
join
(
'
=
'
);
...
...
ee/app/assets/javascripts/boards/stores/boards_store_ee.js
View file @
91795547
...
...
@@ -34,6 +34,7 @@ class BoardsStoreEE {
};
this
.
store
.
updateFiltersUrl
=
(
replaceState
=
false
)
=>
{
if
(
!
this
.
store
.
filter
.
path
)
return
;
if
(
replaceState
)
{
window
.
history
.
replaceState
(
null
,
null
,
`?
${
this
.
store
.
filter
.
path
}
`
);
}
else
{
...
...
ee/changelogs/unreleased/boards-querystring.yml
0 → 100644
View file @
91795547
---
title
:
don't add empty query params to boards
merge_request
:
4441
author
:
type
:
fixed
spec/javascripts/lib/utils/common_utils_spec.js
View file @
91795547
...
...
@@ -30,8 +30,10 @@ describe('common_utils', () => {
});
describe
(
'
getUrlParamsArray
'
,
()
=>
{
it
(
'
should return params array
'
,
()
=>
{
expect
(
commonUtils
.
getUrlParamsArray
()
instanceof
Array
).
toBe
(
true
);
it
(
'
returns empty array for empty querystring
'
,
()
=>
{
expect
(
commonUtils
.
getUrlParamsArray
()
).
toEqual
([]);
});
it
(
'
should remove the question mark from the search params
'
,
()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment