setCommentProperty method

Future setCommentProperty({
  1. required String commentId,
  2. required String propertyKey,
  3. required dynamic body,
})

Creates or updates the value of a property for a comment. Use this resource to store custom data against a comment.

The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters.

Permissions required: either of:

  • Edit All Comments project permission to create or update the value of a property on any comment.
  • Edit Own Comments project permission to create or update the value of a property on a comment created by the user.

Also, when the visibility of a comment is restricted to a role or group the user must be a member of that role or group.

Implementation

Future<dynamic> setCommentProperty(
    {required String commentId,
    required String propertyKey,
    required dynamic body}) async {
  return await _client.send(
    'put',
    'rest/api/3/comment/{commentId}/properties/{propertyKey}',
    pathParameters: {
      'commentId': commentId,
      'propertyKey': propertyKey,
    },
    body: body,
  );
}