Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS API - Updating a work item field

Tags:

c#

tfs

tfs-sdk

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;
like image 698
JF Beaulieu Avatar asked Mar 09 '12 19:03

JF Beaulieu


1 Answers

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();
like image 146
M.Babcock Avatar answered Oct 04 '22 02:10

M.Babcock