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
Show 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"
#import "../fragments/user.fragment.graphql"
query
usersSearch
(
$search
:
String
!)
{
query
usersSearch
(
$search
:
String
!,
$fullPath
:
ID
!)
{
users
(
search
:
$search
)
{
issuable
:
project
(
fullPath
:
$fullPath
)
{
users
:
projectMembers
(
search
:
$search
)
{
nodes
{
nodes
{
user
{
...
User
...
User
}
}
}
}
}
}
}
}
app/assets/javascripts/sidebar/components/assignees/sidebar_assignees_widget.vue
View file @
fda71786
...
@@ -104,11 +104,22 @@ export default {
...
@@ -104,11 +104,22 @@ export default {
query
:
searchUsers
,
query
:
searchUsers
,
variables
()
{
variables
()
{
return
{
return
{
fullPath
:
this
.
fullPath
,
search
:
this
.
search
,
search
:
this
.
search
,
};
};
},
},
update
(
data
)
{
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
,
debounce
:
250
,
skip
()
{
skip
()
{
...
@@ -185,7 +196,7 @@ export default {
...
@@ -185,7 +196,7 @@ export default {
return
this
.
selected
.
some
(
isCurrentUser
)
||
this
.
participants
.
some
(
isCurrentUser
);
return
this
.
selected
.
some
(
isCurrentUser
)
||
this
.
participants
.
some
(
isCurrentUser
);
},
},
noUsersFound
()
{
noUsersFound
()
{
return
!
this
.
isSearchEmpty
&&
this
.
unselectedFiltered
.
length
===
0
;
return
!
this
.
isSearchEmpty
&&
this
.
searchUsers
.
length
===
0
;
},
},
showCurrentUser
()
{
showCurrentUser
()
{
return
!
this
.
isCurrentUserInParticipants
&&
(
this
.
isSearchEmpty
||
this
.
isSearching
);
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,25 +130,31 @@ export const issuableQueryResponse = {
...
@@ -130,25 +130,31 @@ export const issuableQueryResponse = {
export
const
searchQueryResponse
=
{
export
const
searchQueryResponse
=
{
data
:
{
data
:
{
issuable
:
{
users
:
{
users
:
{
nodes
:
[
nodes
:
[
{
{
user
:
{
id
:
'
1
'
,
id
:
'
1
'
,
avatarUrl
:
'
/avatar
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
root
'
,
name
:
'
root
'
,
username
:
'
root
'
,
username
:
'
root
'
,
webUrl
:
'
root
'
,
webUrl
:
'
root
'
,
},
},
},
{
{
user
:
{
id
:
'
3
'
,
id
:
'
3
'
,
avatarUrl
:
'
/avatar
'
,
avatarUrl
:
'
/avatar
'
,
name
:
'
rookie
'
,
name
:
'
rookie
'
,
username
:
'
rookie
'
,
username
:
'
rookie
'
,
webUrl
:
'
rookie
'
,
webUrl
:
'
rookie
'
,
},
},
},
],
],
},
},
},
},
},
};
};
export
const
updateIssueAssigneesMutationResponse
=
{
export
const
updateIssueAssigneesMutationResponse
=
{
...
...
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