Hi All,
I'm using TFS API in my Console Application.
Here is the code snippet of openning a bug in my work.
TeamFoundationServer tfs = new TeamFoundationServer(myUrl);
WorkItemStore store = (WorkItemStore)tfs.GetService(typeof(WorkItemStore));
Project project = store.Projects[myProjectName];
WorkItemType workItemType = project.WorkItemTypes["Bug"];
WorkItem workItem = new WorkItem(workItemType);
workItem.Title = "Test";
workItem.Description = "Test Open Bug";
//Set value for other fields...
workItem.Save();
And here is a question,:
In my work, all the bugs get CreatedBy == myName.
But in fact, I want to set different CreatedBy value for different branch. And it is impossible to change this directly since the Created
by field of the work item is a read only field.
So, I wonder if there is other solution for my problem.
Thanks!