The World’s Largest Online Community for Developers

'; c# - Azure DevOps WorkItem Tracking not working when code generated - LavOzs.Com

I have a problem with azure devops workitem tracking. So we want to use WorkItem tracking for work items, that do not need changes in our source code.

Currently we are tracking Builds and Releases with C# and the Microsoft.TeamFoundation.WorkItemTracking NuGet packages.

The visualization for the build tracking is ok, but the deployments won´t show in the details pane of a ticket.


Ticket related with code

Not OK

Ticket related with CI/CD

The relations both in azure devops and as shown in the debugger seem to be the same:

Ticket Links from ticket related in code

This is our patch operation:

new JsonPatchOperation()
                                Operation = Operation.Add,
                                Path = "/relations/-",
                                Value = new
                                    rel = "ArtifactLink",
                                    url = "vstfs:///ReleaseManagement/ReleaseEnvironment/" + temp.Href.Split('/')[4] + ":"+ release.Id + ":" + environment.Id, 
                                    attributes = new
                                        authorizedDate = DateTime.Now,
                                        //comment = "This build was automatically linked to this work item based on the Tool",
                                        resourceCreatedDate = DateTime.Now,
                                        resourceModifiedDate = DateTime.Now,
                                        name = "Integrated in release environment",
                                        revisedDate = new DateTime(9999, 1, 1, 0, 0, 0, 0)

What should I do, to have the related Release displayed in the details pane of the ticket? I compared every attribute while debugging with a sample ticket I created with CI/CD, every link and relation is OK. Builds are shown, releases not.

Is it possible to Import Azure DevOps Work Items
Azure DevOps: How to avoid a build on new branch creation
Implementing Azure DevOps Services with On-premise TFS Release Manager
Azure DevOps - Private NuGet feed doesn't update stable release
Using Azure DevOps Services with Azure DevOps on-prem Repos and Build/Release. Is that doable?
Azure Devops WorkItems
'Create copy of work item' via REST API for Azure DevOps?
How do I add a link between azure devops work item and a git branch with the node api?