概述
TFS 内置有CMMI模板、敏捷模板等过程模板,但是为了方便团队管理,TFS 提供自定义过程模板的功能。每个团队可以根据需要自定义模板界面、字段、流程等内容。
本文档将会介绍如何自定义过程模板,以及制定的要求。
环境准备
获取修改权限
过程模板修订完成后,需要导入到对应的团队项目中,此时要求执行导入的账号需要具有该项目的管理员权限(权限由服务器管理员开通)。
安装工具
- VS工具:与TFS服务器版本对应的VS工具。
- Process Editor工具:该工具可以实现TFS过程模板的修改、导入、导出等内容。在网上搜索下载即可,需要根据VS的版本手动安装。
自定义模板
- Process Editor工具对于系统模板的修改、字段的查询等都提供了的方式,此处仅介绍Task、Bug工作项模板的修改、导入、导出。
- 2010和2017(2015)TFS过程模板的自定义方式一致,本文档以2017为例进行说明。
导出模板
- 打开2017 VS,选择工具->Process Editor->Work Item Types->Export WIT。
- 在“连接到团队项目集合”中选择一个目标项目集合,点击连接。
- 选择一个项目中的一个工作项类型(Bug、Task、Epic等方式一致,此处以Bug为例),点击OK,然后选择保存路径即可。在弹出的Global List页面中选择是,弹出导出成功提示框后,则代表完成指定项目工作项模板的导出。此时在保存目录中可以看到一个xml格式的文件。
修订模板
通过VS打开模板文件(导出的xml文件),可以看到有三个页面:Fields、Layout、Workflow,分别代表字段定义页面、界面布局页面、工作流定义页面。
Fields
Fields页面用于对模板中的字段进行新增、删除和编辑。
【新增字段】点击页面中的“New”按钮,在弹出的字段定义框中填写新增字段的信息。如图Figure 3 4新增字段定义
Fields Definition
Name:字段名称,具有唯一性。2010版支持中文,2015以上版本不支持中文,只支持英文,。此名称可用于工作项查询列表中的列选项。
Type:数据类型,一般描述性信息为string,日期类用DateTime,特殊类型可以设置为History、Html等。
Referance Name:字段引用名,在程序中需要处理,命名规则为:命名空间.名称,必须是英