microsoft / azure-devops-dotnet-samples

.NET/C# samples for integrating with Azure DevOps Services and Azure DevOps Server
https://docs.microsoft.com/azure/devops/integrate
MIT License
519 stars 511 forks source link

GlobalLists #317

Open ekhcentrics opened 2 years ago

ekhcentrics commented 2 years ago

I am migrating our organization from TFS 2013 to AzureDevOps 2020. (On our own server, not hosted)

Part of the 2013 integration was getting global lists, adding additional values, updating the global lists.

Psuedo code from 2013 integration:

WorkItemStore workItemStore = <retrieved elsewhere in the code>;
XmlDocument globalListsDoc = workItemStore.**ExportGlobalLists**();

XmlNodeList lists = globalListsDoc.SelectNodes("*/GLOBALLIST");
if (lists != null) {
    // <snip> ... find the list of the appropriate name, add <LISTITEM> items if needed </snip>
}

// Update: 
workItemStore.**ImportGlobalLists**(globalListsDoc.FirstChild as XmlElement);

How would I accomplish this in the new world order? Preferrably not via command line - but via client libaries or rest calls?