6

Is it possible to update a field of a work item using the TFS API ?

Something along this line:

WorkItemStore.GetWorkItem(Convert.ToInt32(current.WorkItemId)).State = rcbState.SelectedValue;
Jean-François Beaulieu
  • 4,305
  • 22
  • 74
  • 107

1 Answers1

4

You can set update your WorkItem properties as you show above, just be sure to save them once your done with it.

Something like:

WorkItem item = WorkItemStore.GetWorkItem(Convert.ToInt32(current.WorkItemId));
item.State = rcbState.SelectedValue;
item.Save();
M.Babcock
  • 18,753
  • 6
  • 54
  • 84