Skip to main content

Update Comment

UpdateComment updates an existing comment on a work item.

It calls PATCH https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/comments/{commentId}, where {workItemId} and {commentId} come from the Work Item Id and Comment Id fields.

The activity has four tabs: Configuration, Auth, Input, and Output.

Configuration

FieldRequiredDescription
NameOptionalName of the step, should be unique within this workflow.
DescriptionOptionalDescribe the purpose or function of this step.
Api VersionRequiredEnter the version of the API you want to use.
OrganizationOptionalEnter the name of the organization.
ProjectOptionalEnter the name of the project.
Work Item IdOptionalEnter the ID of the work item.
Comment IdOptionalEnter the ID of the comment.

Auth

FieldRequiredDescription
Auth TypeOptionalSelect the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2.
User NameOptionalUsername for Basic Authentication.
PasswordOptionalPassword for Basic Authentication.

Input

This activity is built on the REST Client, so the Input tab is the generic HTTP request rather than an Azure Boards-shaped payload. The replacement comment text goes in the request body.

FieldRequiredData TypeDescription
TargetRequiredObjectThe HTTP request.

Output

The activity returns an httpResponse object.

FieldData TypeDescription
status.codeIntegerNumeric HTTP status code.
status.messageStringShort message associated with the HTTP status.
headersObjectHTTP response headers.
bodyObjectParsed body of the response — the updated comment.

The response body carries the comment:

FieldData TypeDescription
idIntegerThe id assigned to the comment.
workItemIdIntegerThe id of the work item this comment belongs to.
textStringThe text of the comment.
renderedTextStringThe text of the comment in HTML format.
formatObjectRepresents the possible types for the comment format.
versionIntegerThe current version of the comment.
isDeletedBooleanIndicates if the comment has been deleted.
createdByObjectThe identity that created the comment.
createdDateStringThe creation date of the comment.
createdOnBehalfOfObjectThe identity the comment was added on behalf of.
createdOnBehalfDateStringEffective Date/time value for adding the comment. Can be optionally different from CreatedDate.
modifiedByObjectThe identity that last modified the comment.
modifiedDateStringThe last modification date of the comment.
mentionsArrayThe mentions of the comment.
reactionsArrayThe reactions of the comment.