cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
drako
Helper II
Helper II

How to dectect a chnage i a specific field in DevOps (Discussion and Custom Field)

Hi,

 

   I need a way to detect a change to the DevOps Disucssion field and another Custom Field. Everytime someone adds a comment I want to be able to detect a change to this field and take an action. How can this be done?

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @drako,

 

There is no action that could get the difference between current version of item and previous version of item.

The only way could approach that is use HTTP request api to get previous version item and current item and compare difference.

Returns a fully hydrated work item for the requested revision:

https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/revisions/get?view=azure-devops-rest-6.0 

Returns a work item comment:

https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments%20versions/list?view=azure-devop... 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @drako,

 

There is no action that could get the difference between current version of item and previous version of item.

The only way could approach that is use HTTP request api to get previous version item and current item and compare difference.

Returns a fully hydrated work item for the requested revision:

https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/revisions/get?view=azure-devops-rest-6.0 

Returns a work item comment:

https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments%20versions/list?view=azure-devop... 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

drako
Helper II
Helper II

Thanks @v-litu-msft  I'll try this.... 

Hi @v-litu-msft  I have finally got to do this and I ran into a particular issue...I was able to get the current and previous WorkItem, that worked great but I'm not sure how to get the comments as the API asks for the comment ID and I have not found the comment ID anywhere in the json of the workitem... 

 

Am I missing something?

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (62,819)