[英]How do I programmatically create a new TFS Task?
我正在尋找一個Visual Basic Windows窗體應用程序,它的輸入字段與TFS瀏覽器版本上的新任務創建頁面相似。 這個想法是自動完成一些表格填寫工作,從而節省了時間(即,根據考慮到工作時間和周末的日期來計算時間估計,自動填寫字段)
但是,當我搜索Google時,我會不斷獲得自定義TFS或如何使用界面進行新任務等結果,但是我正在尋找的是我應該用來創建新任務然后保存或搜索的類當前的現有任務。
那么,如果可能,我如何以編程方式創建新的TFS任務? (應該是,Visual Basic和TFS都是Microsoft)
在MSDN上有一個示例。 參見此頁面:“ 使用Team Foundation的客戶端對象模型創建工作項 ”。
該示例的核心是:
// Create the work item.
WorkItem userStory = new WorkItem(workItemType)
{
// The title is generally the only required field that doesn’t have a default value.
// You must set it, or you can’t save the work item. If you’re working with another
// type of work item, there may be other fields that you’ll have to set.
Title = "Recently ordered menu",
Description = "As a return customer, I want to see items that I've recently ordered."
};
// Save the new user story.
userStory.Save();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.