Reputation: 150
I have this code, it must print total time of completed tasks.
WorkItemStore Store = (WorkItemStore)Tfs.GetService(typeof(WorkItemStore));
var query = Store.Query(q.Replace("@project", "'" + ProjInfo.Name + "'").Replace("@Me", "'" + Environment.UserName + "'"));
for (int i = 0; i < query.Count; i++)
{
Console.WriteLine(query[i][Total Work]);
}
But I cannot find any field about time for completed task. Please, show the right path. :)
Upvotes: 0
Views: 500
Reputation: 23434
You need to find the fields that you want to sum in TFS and this depends on the process template.
I think that you will need to sum Completed Work however this is dysfunctional behavior and I would query the validity of your metric.
Upvotes: 1