feat: improve user assignments via quick add magic #3348

Merged
konrad merged 18 commits from feature/better-user-search-assignees into main 2023-06-05 15:03:16 +00:00
Showing only changes of commit 52987060b1 - Show all commits

View File

@ -51,14 +51,18 @@ function validateUser(
query: IUser['username'] | IUser['name'] | IUser['email'],
) {
if (users.length === 1) {
return findPropertyByValue(users, 'username', query, true) ||
return (
findPropertyByValue(users, 'username', query, true) ||
findPropertyByValue(users, 'name', query, true) ||
findPropertyByValue(users, 'email', query, true)
)
}
return findPropertyByValue(users, 'username', query) ||
return (
konrad marked this conversation as resolved Outdated

Fuzzy should be an option of findPropertyByValue.
Picky: use bracket to group return value.

return (
	findPropertyByValue(users, 'username', query) ||
	findPropertyByValue(users, 'name', query) ||
	findPropertyByValue(users, 'email', query)
)
Fuzzy should be an option of `findPropertyByValue`. Picky: use bracket to group return value. ```ts return ( findPropertyByValue(users, 'username', query) || findPropertyByValue(users, 'name', query) || findPropertyByValue(users, 'email', query) )

Done

Done
findPropertyByValue(users, 'username', query) ||
findPropertyByValue(users, 'name', query) ||
findPropertyByValue(users, 'email', query)
)
}
// Check if the label exists