JDBC Driver for Azure DevOps

Build 25.0.9434

WorkItemComments

Retrieves a list of work item comments

Table Specific Information

Select

The driver uses the Azure DevOps API to process WHERE clause conditions built with the following columns and operators:

  • CommentId supports the '=' operator.
  • WorkItemId supports the '=' operator.
  • IncludeDeleted supports the '=' operator.
  • Expand supports the '=' operator.
The rest of the filter is executed client-side in the driver.

For example, the following filters are handled server-side:

SELECT * FROM WorkItemComments WHERE WorkItemId=9
SELECT * FROM WorkItemComments WHERE WorkItemId=9 AND CommentId=17667199
SELECT * FROM WorkItemComments WHERE WorkItemId=9 AND IncludeDeleted=true AND Expand='all'

Insert

The following are examples of inserting into the table:

INSERT INTO WorkItemComments (WorkItemId, Text) VALUES (9, 'Test comment from driver')
INSERT INTO WorkItemComments (WorkItemId, Text, Format) VALUES (9, 'Test comment from driver', 'markdown')

Note that Format can only be modified if AzureDevOpsServiceAPI is set to 7.1 or later.

Update

The following are examples of updating the table:

UPDATE WorkItemComments SET Text='Updated comment from driver' WHERE WorkItemId=9 AND CommentId=17667663
UPDATE WorkItemComments SET Text='Updated comment from driver', Format='markdown' WHERE WorkItemId=9 AND CommentId=17667663

Note that Format can only be modified if AzureDevOpsServiceAPI is set to 7.1 or later.

Delete

The following is an example of deleting data from the table:

DELETE FROM WorkItemComments WHERE WorkItemId=9 AND CommentId=17667663

Columns

Name Type ReadOnly References Description
CommentId [KEY] Integer True

The id assigned to the comment.

WorkItemId [KEY] Integer False

WorkItemIds.Id

The id of the work item this comment belongs to.

Version Integer True

The current version of the comment.

Text String False

The text of the comment.

RenderedText String True

Rendered text. Only included if expanding renderedText.

Format String False

Comment format. Note that this can only be inserted or updated when AzureDevOpsServiceAPI is set to 7.1 or above.

The allowed values are html, markdown.

IsDeleted Boolean True

Indicates if the comment has been deleted. Only available if IncludeDeleted is true.

CreatedDate Datetime True

The creation date of the comment.

ModifiedDate Datetime True

The last modification date of the comment.

CommentUrl String True

URL of the comment.

CreatedByDisplayName String True

The non-unique display name of the comment creator.

CreatedByUrl String True

The URL of the comment creator.

CreatedById String True

The id of the comment creator.

CreatedByUniqueName String True

The unique name of the comment creator.

CreatedByImageUrl String True

The image URL of the comment creator.

CreatedByDescriptor String True

The descriptor of the comment creator.

ModifiedByDisplayName String True

The non-unique display name of the user who last modified the comment.

ModifiedByUrl String True

The URL of the user who last modified the comment.

ModifiedById String True

The id of the user who last modified the comment.

ModifiedByUniqueName String True

The unique name of the user who last modified the comment.

ModifiedByImageUrl String True

The image URL of the user who last modified the comment.

ModifiedByDescriptor String True

The descriptor of the user who last modified the comment.

CreatedOnBehalfDate Datetime True

Effective Date/time value for adding the comment.

CreatedOnBehalfOfDisplayName String True

The non-unique display name of the identity on whose behalf this comment has been added.

CreatedOnBehalfOfUrl String True

The URL of the identity on whose behalf this comment has been added.

CreatedOnBehalfOfId String True

The id of the identity on whose behalf this comment has been added.

CreatedOnBehalfOfUniqueName String True

The unique name of the identity on whose behalf this comment has been added.

CreatedOnBehalfOfImageUrl String True

The image URL of the identity on whose behalf this comment has been added.

CreatedOnBehalfOfDescriptor String True

The descriptor of the identity on whose behalf this comment has been added.

Mentions String True

The mentions of the comment.

Reactions String True

The reactions of the comment. Only included if expanding reactions.

ProjectId String False

Id of the project to which this comment belongs.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements, and offer a more granular control over the tuples that are returned from the data source. Unless otherwise specified, only the = operator is permitted when filtering on pseudocolumns.

Name Type Description
IncludeDeleted Boolean

Whether deleted comments should be retrieved.

Expand String

The expand parameters for work item comments attributes.

The allowed values are all, none, reactions, renderedText, renderedTextOnly.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434