I am building a Web Application using TFS API. I would like to fetch the All the range of "Priority" values from the TFS API and populate my asp.net dropdownlist. Similarly. I would like to fetch All the for `"Severity" and "Triage" and populate them into different dropdownlist.
I have an image of what I am talking about below :
Here is the code I have to access TFS Projects so far Can anyone let me know who I can access all the ITEMS TFS has for Priority, Severity & Triage :
Uri url = new Uri("server location");
NetworkCredential nc = new NetworkCredential(credentials, url);
TfsTeamProjectCollection coll = new TfsTeamProjectCollection(url, nc);
coll.EnsureAuthenticated();
WorkItemStore workItemStore = coll.GetService<WorkItemStore>();
Something like
or
should work. Using the first or second example depends if you want all admitted values or just those admitted in a specific state; you can set even more complex filters.
Substitute
Microsoft.VSTS.Common.Priority
with the other fields you are interested in, the Reference names can be found here.