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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
2f5c551f
Commit
2f5c551f
authored
Oct 25, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add None/Any options for assignee in search bar
parent
ad8a859b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
8 deletions
+31
-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
+5
-2
doc/user/search/img/issues_filter_none_any.png
doc/user/search/img/issues_filter_none_any.png
+0
-0
doc/user/search/index.md
doc/user/search/index.md
+10
-0
locale/gitlab.pot
locale/gitlab.pot
+0
-3
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
...features/issues/filtered_search/dropdown_assignee_spec.rb
+10
-2
No files found.
app/assets/javascripts/filtered_search/issuable_filtered_search_token_keys.js
View file @
2f5c551f
...
...
@@ -58,10 +58,15 @@ export const alternativeTokenKeys = [
export
const
conditions
=
[
{
url
:
'
assignee_id=
0
'
,
url
:
'
assignee_id=
None
'
,
tokenKey
:
'
assignee
'
,
value
:
'
none
'
,
},
{
url
:
'
assignee_id=Any
'
,
tokenKey
:
'
assignee
'
,
value
:
'
any
'
,
},
{
url
:
'
milestone_title=No+Milestone
'
,
tokenKey
:
'
milestone
'
,
...
...
app/views/shared/issuable/_search_bar.html.haml
View file @
2f5c551f
...
...
@@ -61,7 +61,10 @@
%ul
{
data:
{
dropdown:
true
}
}
%li
.filter-dropdown-item
{
data:
{
value:
'none'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'No Assignee'
)
=
_
(
'None'
)
%li
.filter-dropdown-item
{
data:
{
value:
'any'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Any'
)
%li
.divider.droplab-item-ignore
-
if
current_user
=
render
'shared/issuable/user_dropdown_item'
,
...
...
@@ -81,7 +84,7 @@
%li
.filter-dropdown-item
{
data:
{
value:
'upcoming'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Upcoming'
)
%li
.filter-dropdown-item
{
'data-value'
=>
'started'
}
%li
.filter-dropdown-item
{
data:
{
value:
'started'
}
}
%button
.btn.btn-link
{
type:
'button'
}
=
_
(
'Started'
)
%li
.divider.droplab-item-ignore
...
...
doc/user/search/img/issues_filter_none_any.png
0 → 100644
View file @
2f5c551f
27.1 KB
doc/user/search/index.md
View file @
2f5c551f
...
...
@@ -40,6 +40,16 @@ The same process is valid for merge requests. Navigate to your project's **Merge
and click
**Search or filter results...**
. Merge requests can be filtered by author, assignee,
milestone, and label.
### Filtering by **None** / **Any**
Some filter fields like milestone and assignee, allow you to filter by
**None**
or
**Any**
.
![
filter by none any
](
img/issues_filter_none_any.png
)
Selecting
**None**
returns results that have an empty value for that field. E.g.: no milestone, no assignee.
Selecting
**Any**
does the opposite. It returns results that have a non-empty value for that field.
### Searching for specific terms
You can filter issues and merge requests by specific terms included in titles or descriptions.
...
...
locale/gitlab.pot
View file @
2f5c551f
...
...
@@ -4030,9 +4030,6 @@ msgstr ""
msgid "No"
msgstr ""
msgid "No Assignee"
msgstr ""
msgid "No Label"
msgstr ""
...
...
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
View file @
2f5c551f
...
...
@@ -156,13 +156,21 @@ describe 'Dropdown assignee', :js do
expect_filtered_search_input_empty
end
it
'selects `
no assigne
e`'
do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'No
Assigne
e'
).
click
it
'selects `
Non
e`'
do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'No
n
e'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect_tokens
([
assignee_token
(
'none'
)])
expect_filtered_search_input_empty
end
it
'selects `Any`'
do
find
(
'#js-dropdown-assignee .filter-dropdown-item'
,
text:
'Any'
).
click
expect
(
page
).
to
have_css
(
js_dropdown_assignee
,
visible:
false
)
expect_tokens
([
assignee_token
(
'any'
)])
expect_filtered_search_input_empty
end
end
describe
'selecting from dropdown without Ajax call'
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