如何在TFS中始终启用“Reason”字段

时间:2023-01-27 23:07:20

I'm using Visual Studio Team System 2008 and I want to be able to have the 'Reason' field always enabled for work items. Currently, the 'Reason' drop down is only enabled when changing the 'State'. Once you perform a 'Save' the 'Reason' drop down becomes disabled.

我正在使用Visual Studio Team System 2008,我希望能够始终为工作项启用“Reason”字段。目前,只有在更改“状态”时才会启用“原因”下拉菜单。执行“保存”后,“原因”下拉列表将被禁用。

I've tried doing this by modifying the process template, but it can't be done there.

我已经尝试通过修改流程模板来做到这一点,但它不能在那里完成。

What I'm trying to acomplish is the following, say for a 'Test' task.

我想要完成的是以下内容,比如说“测试”任务。

  1. Initial state is 'Active' with a 'Reason' of 'Pending'. This identifies planned testing work that can't start because development work has not completed.

    初始状态为“有效”,“原因”为“待定”。这标识了由于开发工作尚未完成而无法启动的计划测试工作。

  2. Once development completes the developer would set the reason for the 'Test' task to 'Ready'.

    一旦开发完成,开发人员就会将“测试”任务的原因设置为“就绪”。

1 个解决方案

#1


1  

I don't think you can do what you want with the Reason field, as its values are defined within a transition. Its purpose is to give a reason to a state change. Since you are not changing the state of the workitem you do not have access to that field.

我不认为你可以使用Reason字段做你想要的,因为它的值是在转换中定义的。其目的是为国家变革提供理由。由于您没有更改工作项的状态,因此您无权访问该字段。

It sounds like you are really wanting a "Status" type field. I would suggest that would be better served to create a custom field in your workitem for this, rather than using Reason. Add that your custom field to the Active state of the workitem and set up a Rule of "AllowedValues". This will create a combo that you can change anytime you want.

听起来你真的想要一个“状态”类型字段。我建议最好在你的工作项目中创建一个自定义字段,而不是使用Reason。将您的自定义字段添加到工作项的“活动”状态,并设置规则“AllowedValues”。这将创建一个组合,您可以随时更改。

#1


1  

I don't think you can do what you want with the Reason field, as its values are defined within a transition. Its purpose is to give a reason to a state change. Since you are not changing the state of the workitem you do not have access to that field.

我不认为你可以使用Reason字段做你想要的,因为它的值是在转换中定义的。其目的是为国家变革提供理由。由于您没有更改工作项的状态,因此您无权访问该字段。

It sounds like you are really wanting a "Status" type field. I would suggest that would be better served to create a custom field in your workitem for this, rather than using Reason. Add that your custom field to the Active state of the workitem and set up a Rule of "AllowedValues". This will create a combo that you can change anytime you want.

听起来你真的想要一个“状态”类型字段。我建议最好在你的工作项目中创建一个自定义字段,而不是使用Reason。将您的自定义字段添加到工作项的“活动”状态,并设置规则“AllowedValues”。这将创建一个组合,您可以随时更改。