简体   繁体   English

如何以编程方式创建新的TFS任务?

[英]How do I programmatically create a new TFS Task?

I'm looking to create a Visual Basic Windows Form Application which has similar input fields to the new task creation page on the browser version of TFS. 我正在寻找一个Visual Basic Windows窗体应用程序,它的输入字段与TFS浏览器版本上的新任务创建页面相似。 the idea is to automate some of the form filling saving up on time (is, calculating time estimates based on dates taking into account work hours and weekends, automatically filling out fields) 这个想法是自动完成一些表格填写工作,从而节省了时间(即,根据考虑到工作时间和周末的日期来计算时间估计,自动填写字段)

When i search Google however i keep getting results like customizing TFS or how to make a new task using the interface, however what i am looking for is what classes i'm supposed to use to create a new task and then to save it or search current existing tasks. 但是,当我搜索Google时,我会不断获得自定义TFS或如何使用界面进行新任务等结果,但是我正在寻找的是我应该用来创建新任务然后保存或搜索的类当前的现有任务。

So How do I programmatically create a new TFS Task if it's possible? 那么,如果可能,我如何以编程方式创建新的TFS任务? (it should be, Visual Basic and TFS are both Microsoft) (应该是,Visual Basic和TFS都是Microsoft)

There is an example on MSDN. 在MSDN上有一个示例。 See this page: " Create a Work Item By Using the Client Object Model for Team Foundation ". 参见此页面:“ 使用Team Foundation的客户端对象模型创建工作项 ”。

The core of the example is: 该示例的核心是:

// 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.

相关问题 如何创建任务栏 - How do I create a Task Bar SSIS:基于Web查询结果以编程方式创建新的Excel文件 - 如何保存Web查询表名称? - SSIS: Programmatically create new Excel file based on web query results - how do I save the web query table names? 如何为以编程方式创建的PictureBox Array创建事件处理程序? - How do I create an event handler for a programmatically created PictureBox Array? vb.net我如何以编程方式从datagridview向sql数据库添加新行(和更新) - vb.net how do i add a new rows (and update) from datagridview programmatically to sql database 如何在VB.NET中为以编程方式创建的对象创建事件处理程序? - How do I create an event handler for a programmatically created object in VB.NET? 如何以编程方式关闭TFS工作项 - How to programmatically close a TFS work item 在解决方案中添加新图像时,是否需要签入 TFS 中的 vbproj 文件? - Do I need to check in vbproj file in TFS when I add a new image in the solution? 如何以编程方式重新定义变量的类? - How do I redefine the class of a variable programmatically? 如何使用continueWith继续执行另一个任务? - How do I use continueWith to continue a task with another task? 每次单击此按钮时,如何创建一个新的txt文件? - How do I create a new txt file every time I click on this button?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM