Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

How to get Whats New field value from TFS

$
0
0

I cannot find Whats New field on TFS via c# . I can get WorkItem, but where Whats New field?

How to get WorkItem:

publicWorkItemCollectionGetAllWorkItemsFromCollection(String projectName){String collNameTemp =String.Empty;try{var collNodes =this.GetAllCollectionsRaw();foreach(var c in collNodes){TmpCl cl =newTmpCl(c,_InstanceId, _configurationServer);var wis = cl.teamProjectCollection.GetService<WorkItemStore>();foreach(var p in cl.projCollectionInfo){if(p.Name== projectName){
                        collNameTemp = p.Name;var wic = wis.Query(" SELECT [System.Id], [System.WorkItemType],"+" [System.State], [System.Title] "+" FROM WorkItems "+" WHERE [System.TeamProject] = '"+ p.Name+"' ORDER BY [System.WorkItemType], [System.Id]");return wic;}else{}}}}catch(Exception ex){Console.WriteLine(ex.Message);}returnnull;}publicTmpCl(CatalogNode c,StringInstanceId,TfsConfigurationServer configurationServer){try{Guid collectionId =newGuid(c.Resource.Properties[InstanceId]);
          teamProjectCollection = configurationServer.GetTeamProjectCollection(collectionId);Iis=(ICommonStructureService)teamProjectCollection.GetService(typeof(ICommonStructureService));
          projCollectionInfo =Iis.ListAllProjects();}catch(Exception ex){Console.WriteLine( ex.Message);}}

So, i can get Completed Work, for example:

publicStringGetCompletedWorkByTaskWI(String collectionName,WorkItem taskWI){try{foreach(Field f in taskWI.Fields){if(f.Value!=null&& f.Name.Equals("Completed Work")){returnConvert.ToString(f.Value);}elseif(f.Value==null&& f.Name.Equals("Completed Work")){return"0";}}}catch(Exception ex){Console.WriteLine(ex.Message);}return"0";}

But how to get Whats New field? I cannot find it!

May be this field is custom ,i see that field on my TFS Task Template( my tasks have this field), but how to find it?

Please, help me!


Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>