How to handle the relationships between work items and vstfs changesets

38 Views Asked by At

I have two database tables loading that contain the changesets from VersionControl and the work items from DevOps. When I load the changesets I can also see the related work items. When I load work items I can see the related changesets using the $expand parameter.

My issue is when a work item's links are updated or deleted, this does not trigger a modified date change on the work item itself so I have no way of knowing I need to refresh that relationship. The same is true with changesets.

Is there a call I can make that will handle the relationship between those two tables without having to look at every record, or look at every record created within the last 20 days every day? I'd like to be able to easily determine a list of work items that have had their links changed since a point in time.

I've tried looking around at a few solutions but couldn't find anything that was what I was looking for. Things like the Artifact Uri Query requires me to give a set list of changesets I want to re-sync. https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/artifact-uri-query.

1

There are 1 best solutions below

3
Bright Ran-MSFT On

You can try to use the Service Hooks feature to send a web hook to your outside service that the database tables are hosted when there is any links are added or removed from the work items.

  • Trigger on this type of event: Work item updated
  • Links are added or removed: Enabled
  • URL: The HTTP Uri of your outside service that can send a POST request.
  • Basic authentication password: The authentication token/password to your outside service.

enter image description here

enter image description here