如何设置工作项的必填字段和默认值 [英] How to set required fields and default values for work items
问题描述
我将Visual Studio Team Services用于我的项目,并通过Web访问它.我正在使用Scrum模板.
I am using Visual Studio Team Services for my project, and accessing it via the web. I am using the Scrum template.
我试图弄清楚如何为任务"字段设置默认值.例如,对于任务的活动"字段,我想将其设置为必填字段,并在添加新任务时将默认值设置为开发".
I am trying to figure out how to set default values for Task fields. For example, for the task's Activity field, I want to make it a required field, and set the default value to "Development" whenever I add a new task.
我该怎么做?
推荐答案
TFS
在TFS上,您需要自定义流程模板以提供<DEFAULT>
规则.要更改流程模板,您需要使用witadmin
导出要更改的工作项类型定义,然后编辑XML以添加所需的规则,在这种情况下,将使用<DEFAULT>
规则转换为默认状态.重新导入工作项类型定义.
TFS
On TFS you need to customize the process template to provide a <DEFAULT>
rule. To change the process template you need to use witadmin
to export the workitem type definition you want to change, then edit the XML to add the rule you want, in your case a <DEFAULT>
rule on the transition to the default state. The re-import the workitem type definition.
此处解释了流程/规则:
The process/rules are explained here:
- Define a default value or copy a value to a field
- Modify or add a custom work item type (WIT)
在Visual Studio Team Services中,系统字段尚不存在此选项.用于流程定制的功能已在过去几个月中发布,并且正在迅速发展.这些功能可用之前可能要等一会儿.
On Visual Studio Team Services this option does not exist yet for system fields. The features for process customization have been released in the past months and are rapidly evolving. It's probably a short wait until these features will be available.
您可以做的是使用工作项表单上的模板"链接来创建书签,该书签将打开工作项表单并预先填充许多字段.
What you can do is use the "Template" link on the work item form to create a bookmark that will open the work item form with a number of fields pre-filled.
这篇关于如何设置工作项的必填字段和默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!