为Bug转换定义自定义操作 [英] Defining Custom Actions for Bug tranition

查看:85
本文介绍了为Bug转换定义自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试在项目中自定义TFS Bug工作流程。 

I have been trying to customize TFS Bug Work flow in a project. 

 我已经导出了Bug。 xml使用指南  https://msdn.microsoft.com/en-us/library/dd312129.aspx

 I have exported Bug. xml using the guide https://msdn.microsoft.com/en-us/library/dd312129.aspx

我想自定义从"新"到"Acitve"的转换错误被分配给有效用户。并且当提出拉取请求时也从"Acitve"分配到"回顾"。

I want to customise the transition from 'New' to 'Acitve' when a bug is assigned to a valid user.And Also from 'Acitve' to 'Review' when a pull request is made.

我知道我可以使用< transition>和< actions> xml标签用于定义从一种状态到另一种状态的自动转换。

I understand I can use the <transition> and <actions> xml tags to define the auto transition from one state to another.

问题是自定义动作标签的最佳方法是什么,需要"值"支持。 (https://msdn.microsoft.com/en-us/library/ms194990.aspx)

The question is what is the best way to customise action tag, which needs to be supported by 'value'. (https://msdn.microsoft.com/en-us/library/ms194990.aspx)

有没有办法编写代码来调用工作项Rest API来识别这些操作?如果那时,我如何将那段C#代码链接到Bug.xml?

Is there a way to write code to call work item Rest API to identify these actions? If then ,how do I link that piece of C# code to Bug.xml?

还有其他选项吗?

推荐答案

嗨Shazia2385,

Hi Shazia2385,

感谢您在此发帖。

>>是有没有办法编写代码来调用工作项Rest API来识别这些动作?如果那时, 如何将这段C#代码链接到Bug.xml?

如果您想使用C#或REST API执行此操作,则无法执行此操作与Bug.xml文件集成。要使用C#实现此目的,您需要创建自定义控件。定义控件中的所有内容。使用  workItem.FieldChanged
事件
,以实现字段值更改时要执行的操作。以下是有关如何使用此事件的示例:

https://www.codeproject.com/articles/730928/close-a-work-item-only-if-child-work-items-are-c

If you want to use C# or REST API to do this action, this couldn't be integrated with the Bug.xml file. To achieve this using C#, you need to create your custom control. Define all the things in the control. Using the workItem.FieldChanged event to achieve what you want to do when field value changed. Here is an example about how to use this event: https://www.codeproject.com/articles/730928/close-a-work-item-only-if-child-work-items-are-c

祝福


这篇关于为Bug转换定义自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆