Table WorkItemComments
Description
No description available
Supported Operations
Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.| Method | Supported | Reference EndPoint | 
|---|---|---|
| SELECT | query_workitem_comments | |
| INSERT | add_workitem_comment | |
| UPDATE | update_workitem_comment | |
| UPSERT | ||
| DELETE | delete_workitem_comment | |
| LOOKUP | 
Examples
SSIS
Use Azure DevOps Connector in API Source component to read data or in API Destination component to read/write data:
Read from WorkItemComments table using API Source
API Source - Azure DevOps
    Azure DevOps Connector can be used to integrate Azure DevOps data in your App / BI Tools. You can create, read, query, modify, and delete WorkItems, Projects, Teams and more.
    Azure DevOps
    WorkItemComments
    | Required Parameters | |
|---|---|
| Project Name | Fill-in the parameter... | 
| Wiql Query | Fill-in the parameter... | 
| Optional Parameters | |
| Team Id or Name | |
| Use time precision | |
 
Read/write to WorkItemComments table using API Destination
API Destination - Azure DevOps
    Azure DevOps Connector can be used to integrate Azure DevOps data in your App / BI Tools. You can create, read, query, modify, and delete WorkItems, Projects, Teams and more.
    Azure DevOps
    WorkItemComments
    Select
    | Required Parameters | |
|---|---|
| Project Name | Fill-in the parameter... | 
| Wiql Query | Fill-in the parameter... | 
| Optional Parameters | |
| Team Id or Name | |
| Use time precision | |
 
ODBC application
Use these SQL queries in your ODBC application data source:
Get all comments for all work items
SELECT * FROM WorkItemCommentsGet all comments for a work item
SELECT * FROM WorkItemComments 
WHERE WorkItemId=6455Get a comment by Id for a work item
SELECT * FROM WorkItemComments 
WHERE WorkItemId=6455 and Id=5283490Query work item comments using Wiql
SELECT 
	  Id
	, WorkItemId
	, Text
	, RenderedText
	, Format
	, CreatedDate
	, CreatedByUniqueName
	, CreatedById
	, CreatedByDisplayName
	, ModifiedDate
	, ModifiedByUniqueName
	, ModifiedById
	, ModifiedByDisplayName
	, Url
FROM WorkItemComments 
--WHERE Id=5283490 -- get just one comment for specific WorkItem Id
WITH(Query='SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject]=''ProductTesting'' and [System.Id]=6455 ORDER BY [System.Id] DESC')Create work item comment
INSERT INTO WorkItemComments(WorkItemId, Text)
VALUES(6455, 'Adding <strong>html comment</strong> - created on <<FUN_NOW>>')
WITH(Project='ProductTesting')Update work item comment
UPDATE WorkItemComments
SET Text='Updating <strong>html comment</strong> - updated on <<FUN_NOW>>'
Where WorkItemId=6455 and Id=5284411
WITH(Project='ProductTesting')Delete a specific work item by its Id
DELETE FROM WorkItemComments WHERE WorkItemId=6455 and Id=5284411SQL Server
Use these SQL queries in SQL Server after you create a data source in Data Gateway:
Get all comments for all work items
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM WorkItemComments';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Get all comments for a work item
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM WorkItemComments 
WHERE WorkItemId=6455';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Get a comment by Id for a work item
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM WorkItemComments 
WHERE WorkItemId=6455 and Id=5283490';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Query work item comments using Wiql
DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT 
	  Id
	, WorkItemId
	, Text
	, RenderedText
	, Format
	, CreatedDate
	, CreatedByUniqueName
	, CreatedById
	, CreatedByDisplayName
	, ModifiedDate
	, ModifiedByUniqueName
	, ModifiedById
	, ModifiedByDisplayName
	, Url
FROM WorkItemComments 
--WHERE Id=5283490 -- get just one comment for specific WorkItem Id
WITH(Query=''SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject]=''''ProductTesting'''' and [System.Id]=6455 ORDER BY [System.Id] DESC'')';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Create work item comment
DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO WorkItemComments(WorkItemId, Text)
VALUES(6455, ''Adding <strong>html comment</strong> - created on <<FUN_NOW>>'')
WITH(Project=''ProductTesting'')';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Update work item comment
DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE WorkItemComments
SET Text=''Updating <strong>html comment</strong> - updated on <<FUN_NOW>>''
Where WorkItemId=6455 and Id=5284411
WITH(Project=''ProductTesting'')';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY];Delete a specific work item by its Id
DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM WorkItemComments WHERE WorkItemId=6455 and Id=5284411';
EXEC (@MyQuery) AT [LS_TO_AZURE_DEVOPS_IN_GATEWAY]; 
            