findBulkAssignableUsers method
Returns a list of users who can be assigned issues in one or more projects. The list may be restricted to users whose attributes match a string.
This operation takes the users in the range defined by startAt
and
maxResults
, up to the thousandth user, and then returns only the users
from that range that can be assigned issues in the projects. This means
the operation usually returns fewer users than specified in maxResults
.
To get all the users who can be assigned issues in the projects, use
Get all users and filter the records
in your code.
Privacy controls are applied to the response based on the users' preferences. This could mean, for example, that the user's email address is hidden. See the Profile visibility overview for more details.
This operation can be accessed anonymously.
Permissions required: None.
Implementation
Future<List<User>> findBulkAssignableUsers(
{String? query,
String? username,
String? accountId,
required String projectKeys,
int? startAt,
int? maxResults}) async {
return (await _client.send(
'get',
'rest/api/3/user/assignable/multiProjectSearch',
queryParameters: {
if (query != null) 'query': query,
if (username != null) 'username': username,
if (accountId != null) 'accountId': accountId,
'projectKeys': projectKeys,
if (startAt != null) 'startAt': '$startAt',
if (maxResults != null) 'maxResults': '$maxResults',
},
) as List<Object?>)
.map((i) => User.fromJson(i as Map<String, Object?>? ?? const {}))
.toList();
}