setUserProperty method

Future setUserProperty({
  1. String? accountId,
  2. String? userKey,
  3. String? username,
  4. required String propertyKey,
  5. required dynamic body,
})

Sets the value of a user's property. Use this resource to store custom data against a user.

Note: This operation does not access the user properties created and maintained in Jira.

Permissions required:

  • Administer Jira global permission, to set a property on any user.
  • Access to Jira, to set a property on the calling user's record.

Implementation

Future<dynamic> setUserProperty(
    {String? accountId,
    String? userKey,
    String? username,
    required String propertyKey,
    required dynamic body}) async {
  return await _client.send(
    'put',
    'rest/api/3/user/properties/{propertyKey}',
    pathParameters: {
      'propertyKey': propertyKey,
    },
    queryParameters: {
      if (accountId != null) 'accountId': accountId,
      if (userKey != null) 'userKey': userKey,
      if (username != null) 'username': username,
    },
    body: body,
  );
}