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
516378f3
Commit
516378f3
authored
Dec 03, 2018
by
🙈 jacopo beschi 🙉
Committed by
Clement Ho
Dec 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Filter by `None`/`Any` for labels in issues/mrs/boards"
parent
006659e7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
8 deletions
+27
-8
app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
...ts/filtered_search/issuable_filtered_search_token_keys.js
+6
-1
app/views/shared/issuable/_search_bar.html.haml
app/views/shared/issuable/_search_bar.html.haml
+4
-1
changelogs/unreleased/52370-filter-by-none-any-for-labels-in-issues-mrs-boards.yml
...70-filter-by-none-any-for-labels-in-issues-mrs-boards.yml
+5
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/boards/modal_filter_spec.rb
spec/features/boards/modal_filter_spec.rb
+1
-1
spec/features/issues/filtered_search/dropdown_label_spec.rb
spec/features/issues/filtered_search/dropdown_label_spec.rb
+11
-2
No files found.
app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
View file @
516378f3
...
...
@@ -88,10 +88,15 @@ export const conditions = [
value
:
'
started
'
,
},
{
url
:
'
label_name[]=No
+Label
'
,
url
:
'
label_name[]=No
ne
'
,
tokenKey
:
'
label
'
,
value
:
'
none
'
,
},
{
url
:
'
label_name[]=Any
'
,
tokenKey
:
'
any
'
,
value
:
'
any
'
,
},
{
url
:
'
my_reaction_emoji=None
'
,
tokenKey
:
'
my-reaction
'
,
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
516378f3
...
...
@@ -95,7 +95,10 @@
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'none'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'No Label'
)
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'any'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.divider.droplab-item-ignore
%ul
.filter-dropdown
{
data:
{
dynamic:
true
,
dropdown:
true
}
}
%li
.filter-dropdown-item
...
...
changelogs/unreleased/52370-filter-by-none-any-for-labels-in-issues-mrs-boards.yml
0 → 100644
View file @
516378f3
---
title
:
Adds Any option to label filters
merge_request
:
23111
author
:
Jacopo Beschi @jacopo-beschi
type
:
added
locale/gitlab.pot
View file @
516378f3
...
...
@@ -4297,9 +4297,6 @@ msgstr ""
msgid "No"
msgstr ""
msgid "No Label"
msgstr ""
msgid "No assignee"
msgstr ""
...
...
spec/features/boards/modal_filter_spec.rb
View file @
516378f3
...
...
@@ -176,7 +176,7 @@ describe 'Issue Boards add issue modal filtering', :js do
it
'filters by no label'
do
set_filter
(
'label'
)
click_filter_link
(
'No
Label
'
)
click_filter_link
(
'No
ne
'
)
submit_filter
page
.
within
(
'.add-issues-modal'
)
do
...
...
spec/features/issues/filtered_search/dropdown_label_spec.rb
View file @
516378f3
...
...
@@ -45,7 +45,8 @@ describe 'Dropdown label', :js do
bug_label
=
create
(
:label
,
project:
project
,
title:
'bug-label'
)
init_label_search
filtered_search
.
native
.
send_keys
(
:down
,
:down
,
:enter
)
# navigate to the bug_label option and selects it
filtered_search
.
native
.
send_keys
(
:down
,
:down
,
:down
,
:enter
)
expect_tokens
([
label_token
(
bug_label
.
title
)])
expect_filtered_search_input_empty
...
...
@@ -234,12 +235,20 @@ describe 'Dropdown label', :js do
end
it
'selects `no label`'
do
find
(
"
#{
js_dropdown_label
}
.filter-dropdown-item"
,
text:
'No
Label
'
).
click
find
(
"
#{
js_dropdown_label
}
.filter-dropdown-item"
,
text:
'No
ne
'
).
click
expect
(
page
).
not_to
have_css
(
js_dropdown_label
)
expect_tokens
([
label_token
(
'none'
,
false
)])
expect_filtered_search_input_empty
end
it
'selects `any label`'
do
find
(
"
#{
js_dropdown_label
}
.filter-dropdown-item"
,
text:
'Any'
).
click
expect
(
page
).
not_to
have_css
(
js_dropdown_label
)
expect_tokens
([
label_token
(
'any'
,
false
)])
expect_filtered_search_input_empty
end
end
describe
'input has existing content'
do
...
...
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