我正在嘗試使用C#代碼創建一個tfs任務。我可以用下面的代碼添加任務。 但我無法通過此添加assignedto,關鍵字,優先等。我沒有在workItemType對象中找到相關的屬性。添加具有優先級的TFS任務,分配給使用C#
我試過字段[「關鍵字」]等,但它沒有爲我工作。任何指針請
private static readonly Uri TfsServer = new Uri("my tfs url");
static readonly TfsTeamProjectCollection tpc = new TfsTeamProjectCollection(TfsServer);
static readonly WorkItemStore workItemStore = tpc.GetService<WorkItemStore>();
static readonly Project teamProject = workItemStore.Projects["my project name"];
static readonly WorkItemType workItemType = teamProject.WorkItemTypes["Task"];
WorkItem tfsTask = new WorkItem(workItemType)
{
Title = "Test Title",
//assignedto,
State = "Proposed",
//substatus ="Not Started",
AreaPath = @"my path",
IterationPath = @"my iteration path",
//Keywords ="my keyword",
//prioity=3
Description = "newVcDescription"
};
tfsTask.Save();