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
| Field | Required | Description |
|---|---|---|
| Name | Optional | Name of the step, should be unique within this workflow. |
| Description | Optional | Describe the purpose or function of this step. |
| Api Version | Required | Enter the version of the API you want to use. |
| Organization | Optional | Enter the name of the organization. |
| Project | Optional | Enter the name of the project. |
| Work Item Id | Optional | Enter the ID of the work item. |
| Comment Id | Optional | Enter the ID of the comment. |
Auth
| Field | Required | Description |
|---|---|---|
| Auth Type | Optional | Select the authentication method for the request. Options: No Auth, Basic, API Key, OAuth 2. |
| User Name | Optional | Username for Basic Authentication. |
| Password | Optional | Password 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.
| Field | Required | Data Type | Description |
|---|---|---|---|
| Target | Required | Object | The HTTP request. |
Output
The activity returns an httpResponse object.
| Field | Data Type | Description |
|---|---|---|
| status.code | Integer | Numeric HTTP status code. |
| status.message | String | Short message associated with the HTTP status. |
| headers | Object | HTTP response headers. |
| body | Object | Parsed body of the response — the updated comment. |
The response body carries the comment:
| Field | Data Type | Description |
|---|---|---|
| id | Integer | The id assigned to the comment. |
| workItemId | Integer | The id of the work item this comment belongs to. |
| text | String | The text of the comment. |
| renderedText | String | The text of the comment in HTML format. |
| format | Object | Represents the possible types for the comment format. |
| version | Integer | The current version of the comment. |
| isDeleted | Boolean | Indicates if the comment has been deleted. |
| createdBy | Object | The identity that created the comment. |
| createdDate | String | The creation date of the comment. |
| createdOnBehalfOf | Object | The identity the comment was added on behalf of. |
| createdOnBehalfDate | String | Effective Date/time value for adding the comment. Can be optionally different from CreatedDate. |
| modifiedBy | Object | The identity that last modified the comment. |
| modifiedDate | String | The last modification date of the comment. |
| mentions | Array | The mentions of the comment. |
| reactions | Array | The reactions of the comment. |