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
aaa23968
Commit
aaa23968
authored
Jan 16, 2018
by
Simon Knox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix board filter parsing - don't replace encoded + symbols with spaces
parent
5abdcf1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
app/assets/javascripts/boards/utils/query_data.js
app/assets/javascripts/boards/utils/query_data.js
+1
-1
changelogs/unreleased/34252-trailing-plus.yml
changelogs/unreleased/34252-trailing-plus.yml
+5
-0
spec/javascripts/boards/utils/query_data_spec.js
spec/javascripts/boards/utils/query_data_spec.js
+21
-0
No files found.
app/assets/javascripts/boards/utils/query_data.js
View file @
aaa23968
...
@@ -5,7 +5,7 @@ export default (path, extraData) => path.split('&').reduce((dataParam, filterPar
...
@@ -5,7 +5,7 @@ export default (path, extraData) => path.split('&').reduce((dataParam, filterPar
const
paramSplit
=
filterParam
.
split
(
'
=
'
);
const
paramSplit
=
filterParam
.
split
(
'
=
'
);
const
paramKeyNormalized
=
paramSplit
[
0
].
replace
(
'
[]
'
,
''
);
const
paramKeyNormalized
=
paramSplit
[
0
].
replace
(
'
[]
'
,
''
);
const
isArray
=
paramSplit
[
0
].
indexOf
(
'
[]
'
);
const
isArray
=
paramSplit
[
0
].
indexOf
(
'
[]
'
);
const
value
=
decodeURIComponent
(
paramSplit
[
1
]
).
replace
(
/
\+
/g
,
'
'
);
const
value
=
decodeURIComponent
(
paramSplit
[
1
]
.
replace
(
/
\+
/g
,
'
'
)
);
if
(
isArray
!==
-
1
)
{
if
(
isArray
!==
-
1
)
{
if
(
!
data
[
paramKeyNormalized
])
{
if
(
!
data
[
paramKeyNormalized
])
{
...
...
changelogs/unreleased/34252-trailing-plus.yml
0 → 100644
View file @
aaa23968
---
title
:
allow trailing + on labels in board filters
merge_request
:
author
:
type
:
fixed
spec/javascripts/boards/utils/query_data_spec.js
0 → 100644
View file @
aaa23968
import
queryData
from
'
~/boards/utils/query_data
'
;
describe
(
'
queryData
'
,
()
=>
{
it
(
'
parses path for label with trailing +
'
,
()
=>
{
const
path
=
'
label_name[]=label%2B
'
;
expect
(
queryData
(
path
,
{}),
).
toEqual
({
label_name
:
[
'
label+
'
],
});
});
it
(
'
parses path for milestone with trailing +
'
,
()
=>
{
const
path
=
'
milestone_title=A%2B
'
;
expect
(
queryData
(
path
,
{}),
).
toEqual
({
milestone_title
:
'
A+
'
,
});
});
});
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