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
fda71786
Commit
fda71786
authored
Mar 02, 2021
by
Natalia Tepluhina
Committed by
Nicolò Maria Mezzopera
Mar 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix assignees search to show only project members
parent
440396b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
34 deletions
+49
-34
app/assets/javascripts/boards/graphql/users_search.query.graphql
...ets/javascripts/boards/graphql/users_search.query.graphql
+0
-11
app/assets/javascripts/graphql_shared/queries/users_search.query.graphql
...scripts/graphql_shared/queries/users_search.query.graphql
+8
-4
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
...sidebar/components/assignees/sidebar_assignees_widget.vue
+13
-2
changelogs/unreleased/322960-degredation-in-assigning-team-members-on-boards-view.yml
...-degredation-in-assigning-team-members-on-boards-view.yml
+5
-0
ee/spec/frontend/sidebar/mock_data.js
ee/spec/frontend/sidebar/mock_data.js
+23
-17
No files found.
app/assets/javascripts/boards/graphql/users_search.query.graphql
deleted
100644 → 0
View file @
440396b3
query
usersSearch
(
$search
:
String
!)
{
users
(
search
:
$search
)
{
nodes
{
username
name
webUrl
avatarUrl
id
}
}
}
app/assets/javascripts/graphql_shared/queries/users_search.query.graphql
View file @
fda71786
#import "../fragments/user.fragment.graphql"
query
usersSearch
(
$search
:
String
!)
{
users
(
search
:
$search
)
{
nodes
{
...
User
query
usersSearch
(
$search
:
String
!,
$fullPath
:
ID
!)
{
issuable
:
project
(
fullPath
:
$fullPath
)
{
users
:
projectMembers
(
search
:
$search
)
{
nodes
{
user
{
...
User
}
}
}
}
}
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
View file @
fda71786
...
...
@@ -104,11 +104,22 @@ export default {
query
:
searchUsers
,
variables
()
{
return
{
fullPath
:
this
.
fullPath
,
search
:
this
.
search
,
};
},
update
(
data
)
{
return
data
.
users
?.
nodes
||
[];
const
searchResults
=
data
.
issuable
?.
users
?.
nodes
.
map
(({
user
})
=>
user
)
||
[];
const
mergedSearchResults
=
this
.
participants
.
reduce
((
acc
,
current
)
=>
{
if
(
!
acc
.
some
((
user
)
=>
current
.
username
===
user
.
username
)
&&
(
current
.
name
.
includes
(
this
.
search
)
||
current
.
username
.
includes
(
this
.
search
))
)
{
acc
.
push
(
current
);
}
return
acc
;
},
searchResults
);
return
mergedSearchResults
;
},
debounce
:
250
,
skip
()
{
...
...
@@ -185,7 +196,7 @@ export default {
return
this
.
selected
.
some
(
isCurrentUser
)
||
this
.
participants
.
some
(
isCurrentUser
);
},
noUsersFound
()
{
return
!
this
.
isSearchEmpty
&&
this
.
unselectedFiltered
.
length
===
0
;
return
!
this
.
isSearchEmpty
&&
this
.
searchUsers
.
length
===
0
;
},
showCurrentUser
()
{
return
!
this
.
isCurrentUserInParticipants
&&
(
this
.
isSearchEmpty
||
this
.
isSearching
);
...
...
changelogs/unreleased/322960-degredation-in-assigning-team-members-on-boards-view.yml
0 → 100644
View file @
fda71786
---
title
:
Fix assignees search to show only project members
merge_request
:
55396
author
:
type
:
fixed
ee/spec/frontend/sidebar/mock_data.js
View file @
fda71786
...
...
@@ -130,23 +130,29 @@ export const issuableQueryResponse = {
export
const
searchQueryResponse
=
{
data
:
{
users
:
{
nodes
:
[
{
id
:
'
1
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
root
'
,
username
:
'
root
'
,
webUrl
:
'
root
'
,
},
{
id
:
'
3
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
rookie
'
,
username
:
'
rookie
'
,
webUrl
:
'
rookie
'
,
},
],
issuable
:
{
users
:
{
nodes
:
[
{
user
:
{
id
:
'
1
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
root
'
,
username
:
'
root
'
,
webUrl
:
'
root
'
,
},
},
{
user
:
{
id
:
'
3
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
rookie
'
,
username
:
'
rookie
'
,
webUrl
:
'
rookie
'
,
},
},
],
},
},
},
};
...
...
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