BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d8c7ab15
Commit
d8c7ab15
authored
Jan 19, 2017
by
Sean McGivern
Committed by
James Lopez
Jan 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge branch 'current-user-filter-top' into 'master'
Shows current user on top of filtered dropdown list Closes #26765 See merge request !8612
parent
1f466548
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
autocomplete_controller.rb
app/controllers/autocomplete_controller.rb
+1
-1
dropdown_assignee_spec.rb
...features/issues/filtered_search/dropdown_assignee_spec.rb
+6
-0
dropdown_author_spec.rb
spec/features/issues/filtered_search/dropdown_author_spec.rb
+6
-0
No files found.
app/controllers/autocomplete_controller.rb
View file @
d8c7ab15
...
...
@@ -18,7 +18,7 @@ class AutocompleteController < ApplicationController
if
params
[
:search
].
blank?
# Include current user if available to filter by "Me"
if
params
[
:current_user
].
present?
&&
current_user
@users
=
[
*
@users
,
current_user
]
@users
=
[
current_user
,
*
@users
]
end
if
params
[
:author_id
].
present?
...
...
spec/features/issues/filtered_search/dropdown_assignee_spec.rb
View file @
d8c7ab15
...
...
@@ -66,6 +66,12 @@ describe 'Dropdown assignee', js: true, feature: true do
expect
(
dropdown_assignee_size
).
to
eq
(
3
)
end
it
'shows current user at top of dropdown'
do
send_keys_to_filtered_search
(
'assignee:'
)
expect
(
first
(
'#js-dropdown-assignee .filter-dropdown li'
)).
to
have_content
(
user
.
name
)
end
end
describe
'filtering'
do
...
...
spec/features/issues/filtered_search/dropdown_author_spec.rb
View file @
d8c7ab15
...
...
@@ -66,6 +66,12 @@ describe 'Dropdown author', js: true, feature: true do
expect
(
dropdown_author_size
).
to
eq
(
3
)
end
it
'shows current user at top of dropdown'
do
send_keys_to_filtered_search
(
'author:'
)
expect
(
first
(
'#js-dropdown-author li'
)).
to
have_content
(
user
.
name
)
end
end
describe
'filtering'
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