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
dab6aab2
Commit
dab6aab2
authored
Apr 24, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assignee filter on group issues/merge requests only loads group users
Closes #29490
parent
90f73438
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
1 deletion
+22
-1
app/assets/javascripts/users_select.js
app/assets/javascripts/users_select.js
+1
-0
app/views/shared/issuable/_filter.html.haml
app/views/shared/issuable/_filter.html.haml
+1
-1
changelogs/unreleased/group-assignee-dropdown-send-group-id.yml
...logs/unreleased/group-assignee-dropdown-send-group-id.yml
+4
-0
spec/features/groups/issues_spec.rb
spec/features/groups/issues_spec.rb
+16
-0
No files found.
app/assets/javascripts/users_select.js
View file @
dab6aab2
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
var
$block
,
$collapsedSidebar
,
$dropdown
,
$loading
,
$selectbox
,
$value
,
abilityName
,
assignTo
,
assigneeTemplate
,
collapsedAssigneeTemplate
,
defaultLabel
,
firstUser
,
issueURL
,
selectedId
,
showAnyUser
,
showNullUser
,
showMenuAbove
;
var
$block
,
$collapsedSidebar
,
$dropdown
,
$loading
,
$selectbox
,
$value
,
abilityName
,
assignTo
,
assigneeTemplate
,
collapsedAssigneeTemplate
,
defaultLabel
,
firstUser
,
issueURL
,
selectedId
,
showAnyUser
,
showNullUser
,
showMenuAbove
;
$dropdown
=
$
(
dropdown
);
$dropdown
=
$
(
dropdown
);
options
.
projectId
=
$dropdown
.
data
(
'
project-id
'
);
options
.
projectId
=
$dropdown
.
data
(
'
project-id
'
);
options
.
groupId
=
$dropdown
.
data
(
'
group-id
'
);
options
.
showCurrentUser
=
$dropdown
.
data
(
'
current-user
'
);
options
.
showCurrentUser
=
$dropdown
.
data
(
'
current-user
'
);
options
.
todoFilter
=
$dropdown
.
data
(
'
todo-filter
'
);
options
.
todoFilter
=
$dropdown
.
data
(
'
todo-filter
'
);
options
.
todoStateFilter
=
$dropdown
.
data
(
'
todo-state-filter
'
);
options
.
todoStateFilter
=
$dropdown
.
data
(
'
todo-state-filter
'
);
...
...
app/views/shared/issuable/_filter.html.haml
View file @
dab6aab2
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
-
if
params
[
:assignee_id
].
present?
-
if
params
[
:assignee_id
].
present?
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
hidden_field_tag
(
:assignee_id
,
params
[
:assignee_id
])
=
dropdown_tag
(
user_dropdown_label
(
params
[
:assignee_id
],
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
=
dropdown_tag
(
user_dropdown_label
(
params
[
:assignee_id
],
"Assignee"
),
options:
{
toggle_class:
"js-user-search js-filter-submit js-assignee-search"
,
title:
"Filter by assignee"
,
filter:
true
,
dropdown_class:
"dropdown-menu-user dropdown-menu-selectable dropdown-menu-assignee js-filter-submit"
,
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Assignee"
,
first_user:
current_user
.
try
(
:username
),
null_user:
true
,
current_user:
true
,
project_id:
@project
.
try
(
:id
),
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
,
default_label:
"Assignee"
}
})
placeholder:
"Search assignee"
,
data:
{
any_user:
"Any Assignee"
,
first_user:
current_user
.
try
(
:username
),
null_user:
true
,
current_user:
true
,
project_id:
@project
.
try
(
:id
),
group_id:
@group
&
.
id
,
selected:
params
[
:assignee_id
],
field_name:
"assignee_id"
,
default_label:
"Assignee"
}
})
.filter-item.inline.milestone-filter
.filter-item.inline.milestone-filter
=
render
"shared/issuable/milestone_dropdown"
,
selected:
finder
.
milestones
.
try
(
:first
),
name: :milestone_title
,
show_any:
true
,
show_upcoming:
true
,
show_started:
true
=
render
"shared/issuable/milestone_dropdown"
,
selected:
finder
.
milestones
.
try
(
:first
),
name: :milestone_title
,
show_any:
true
,
show_upcoming:
true
,
show_started:
true
...
...
changelogs/unreleased/group-assignee-dropdown-send-group-id.yml
0 → 100644
View file @
dab6aab2
---
title
:
Fixed group issues assignee dropdown loading all users
merge_request
:
author
:
spec/features/groups/issues_spec.rb
View file @
dab6aab2
...
@@ -23,4 +23,20 @@ feature 'Group issues page', feature: true do
...
@@ -23,4 +23,20 @@ feature 'Group issues page', feature: true do
it_behaves_like
"an autodiscoverable RSS feed without a private token"
it_behaves_like
"an autodiscoverable RSS feed without a private token"
end
end
end
end
context
'assignee'
,
:js
do
let
(
:access_level
)
{
ProjectFeature
::
ENABLED
}
let
(
:user
)
{
user_in_group
}
let
(
:user2
)
{
user_outside_group
}
let
(
:path
)
{
issues_group_path
(
group
)
}
it
'filters by only group users'
do
click_button
(
'Assignee'
)
wait_for_ajax
expect
(
find
(
'.dropdown-menu-assignee'
)).
to
have_link
(
user
.
name
)
expect
(
find
(
'.dropdown-menu-assignee'
)).
not_to
have_link
(
user2
.
name
)
end
end
end
end
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