I have to obtain the value of a field in a single work item. The query only returns one work item, because in my where clause I specify exaclty which Work Item Id I want. It's sort of a GetFieldByWorkItemId
kind of method:
public double GetOriginalEstimate(object id)
{
WorkItemCollection queryResults = workItemStore.Query(
" SELECT [Original Estimate]" +
" FROM WorkItems " +
" WHERE [ID] = " + Convert.ToInt32(id)
);
return 0;
}
My two questions are:
- How can I get a work item from the
WorkItemCollection
queryResults by Id - How can I get the value of the field that I'm interested in:
[Original Estimate]