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
59fab5de
Commit
59fab5de
authored
Jan 18, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ce-to-ee-2018-01-18' into 'master'
CE upstream - Thursday See merge request gitlab-org/gitlab-ee!4139
parents
6aad9fdc
126c03f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
1 deletion
+44
-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/features/boards/boards_spec.rb
spec/features/boards/boards_spec.rb
+11
-0
spec/javascripts/boards/utils/query_data_spec.js
spec/javascripts/boards/utils/query_data_spec.js
+27
-0
No files found.
app/assets/javascripts/boards/utils/query_data.js
View file @
59fab5de
...
@@ -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 @
59fab5de
---
title
:
Allow trailing + on labels in board filters
merge_request
:
16490
author
:
type
:
fixed
spec/features/boards/boards_spec.rb
View file @
59fab5de
...
@@ -71,6 +71,7 @@ describe 'Issue Boards', :js do
...
@@ -71,6 +71,7 @@ describe 'Issue Boards', :js do
let!
(
:backlog
)
{
create
(
:label
,
project:
project
,
name:
'Backlog'
)
}
let!
(
:backlog
)
{
create
(
:label
,
project:
project
,
name:
'Backlog'
)
}
let!
(
:closed
)
{
create
(
:label
,
project:
project
,
name:
'Closed'
)
}
let!
(
:closed
)
{
create
(
:label
,
project:
project
,
name:
'Closed'
)
}
let!
(
:accepting
)
{
create
(
:label
,
project:
project
,
name:
'Accepting Merge Requests'
)
}
let!
(
:accepting
)
{
create
(
:label
,
project:
project
,
name:
'Accepting Merge Requests'
)
}
let!
(
:a_plus
)
{
create
(
:label
,
project:
project
,
name:
'A+'
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let!
(
:list1
)
{
create
(
:list
,
board:
board
,
label:
planning
,
position:
0
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
let!
(
:list2
)
{
create
(
:list
,
board:
board
,
label:
development
,
position:
1
)
}
...
@@ -85,6 +86,7 @@ describe 'Issue Boards', :js do
...
@@ -85,6 +86,7 @@ describe 'Issue Boards', :js do
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ggg'
,
description:
'777'
,
labels:
[
development
],
relative_position:
2
)
}
let!
(
:issue7
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'ggg'
,
description:
'777'
,
labels:
[
development
],
relative_position:
2
)
}
let!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
,
title:
'hhh'
,
description:
'888'
)
}
let!
(
:issue8
)
{
create
(
:closed_issue
,
project:
project
,
title:
'hhh'
,
description:
'888'
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'iii'
,
description:
'999'
,
labels:
[
planning
,
testing
,
bug
,
accepting
],
relative_position:
1
)
}
let!
(
:issue9
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'iii'
,
description:
'999'
,
labels:
[
planning
,
testing
,
bug
,
accepting
],
relative_position:
1
)
}
let!
(
:issue10
)
{
create
(
:labeled_issue
,
project:
project
,
title:
'issue +'
,
description:
'A+ great issue'
,
labels:
[
a_plus
])
}
before
do
before
do
visit
project_boards_path
(
project
)
visit
project_boards_path
(
project
)
...
@@ -402,6 +404,15 @@ describe 'Issue Boards', :js do
...
@@ -402,6 +404,15 @@ describe 'Issue Boards', :js do
wait_for_empty_boards
((
3
..
4
))
wait_for_empty_boards
((
3
..
4
))
end
end
it
'filters by label with encoded character'
do
set_filter
(
"label"
,
a_plus
.
title
)
click_filter_link
(
a_plus
.
title
)
submit_filter
wait_for_board_cards
(
1
,
1
)
wait_for_empty_boards
((
2
..
4
))
end
it
'filters by label with space after reload'
do
it
'filters by label with space after reload'
do
set_filter
(
"label"
,
"
\"
#{
accepting
.
title
}
"
)
set_filter
(
"label"
,
"
\"
#{
accepting
.
title
}
"
)
click_filter_link
(
accepting
.
title
)
click_filter_link
(
accepting
.
title
)
...
...
spec/javascripts/boards/utils/query_data_spec.js
0 → 100644
View file @
59fab5de
import
queryData
from
'
~/boards/utils/query_data
'
;
describe
(
'
queryData
'
,
()
=>
{
it
(
'
parses path for label with trailing +
'
,
()
=>
{
expect
(
queryData
(
'
label_name[]=label%2B
'
,
{}),
).
toEqual
({
label_name
:
[
'
label+
'
],
});
});
it
(
'
parses path for milestone with trailing +
'
,
()
=>
{
expect
(
queryData
(
'
milestone_title=A%2B
'
,
{}),
).
toEqual
({
milestone_title
:
'
A+
'
,
});
});
it
(
'
parses path for search terms with spaces
'
,
()
=>
{
expect
(
queryData
(
'
search=two+words
'
,
{}),
).
toEqual
({
search
:
'
two words
'
,
});
});
});
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