如何更改 TFS 中的 System.State 字段? [英] How to change System.State field in TFS?

查看:22
本文介绍了如何更改 TFS 中的 System.State 字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个要求,当其他字段更改时,我确实需要更改 workitemSystem.State 字段.我知道 TFS 工作流是基于状态的,即根据状态您可以更改其他字段的值.但如何走另一条路?

I have the requirement where I do need to change the System.State field of workitem when other field gets changed. I know TFS workflow is state-based i.e. depending upon the state you can change values of other fields. But how to go another way around?

- 马约尔

推荐答案

我认为您无法通过使用内置工作项工作流来实现这一目标.这是因为必须使用 <COPY> 规则来设置字段的值.但是,您不能将 与 System.State 字段一起使用.尝试这样做会导致以下错误:

I don't think you can achieve that by using the built-in work item workflow. That's due to the fact that one must use the <COPY> rule in order to set the value of a field. However, you can't use <COPY> with the System.State field. Trying to do so results in the following error:

TF26062:不支持规则 '<COPY from="value" value="Active"/>'对于System.State"字段.

TF26062: Rule '<COPY from="value" value="Active" />' is not supported for the field 'System.State'.

这给您留下了两个选择:

That leaves you with two options:

  1. 创建自定义控件.它具有即时反馈的优势,但开发成本可能非常高 - 特别是如果您可以支持 WinForms (Visual Studio)、Web (Team Web Access) 和 Java (Eclipse + TEE);
  2. 从服务器端处理它,监控 WorkItemChanged 事件.缺点是它不会立即反映在最终用户屏幕中.编辑工作项后,用户必须点击刷新才能查看新状态.

这篇关于如何更改 TFS 中的 System.State 字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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