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!