I want to create a new work item in TFS using the SDK, and I would like to set the item effort ratings. My code currently looks like this
var coll = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("http://galaxy:8080/tfs/crisp"));
var workItemService = coll.GetService<WorkItemStore>();
var parent = workItemService.GetWorkItem(parentWorkItemId);
WorkItemType workItemType =parent.Project.WorkItemTypes
.Cast<WorkItemType>()
.First(candidateType => candidateType.Name.Equals("Task"));
WorkItem item = workItemType.NewWorkItem();
item.Title = work.Name;
workItemService.BatchSave(new WorkItem[]{ item });
But nothing exists on the WorkItem interface that allows me to establish an effort rating. Does anyone know how to do this?
source
share