我的TFS Bug.xml中有一个字段,如下所示
<FIELD name="Root Cause" refname="core.resolution" type="String">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="Code" />
<LISTITEM value="Working as Designed" />
<LISTITEM value="Documentation" />
<LISTITEM value="SPaG" />
<LISTITEM value="User Interface" />
<LISTITEM value="Database" />
<LISTITEM value="Test Data" />
<LISTITEM value="Duplicate" />
<LISTITEM value="Cannot Reproduce" />
<LISTITEM value="UX" />
<LISTITEM value="Environment" />
<LISTITEM value="Integration" />
</ALLOWEDVALUES>
<WHENNOT field="System.State" value="Done">
<READONLY />
</WHENNOT>
</FIELD>
但是,我的意图是当State:字段完成时,只有当我的根本原因字段可见时,我该如何修改我的XML来实现这一目标?
<Column PercentWidth="33">
<Group Label="Details">
<Column PercentWidth="100">
<Control FieldName="Microsoft.VSTS.Common.Severity" Type="FieldControl" Label="Priority" LabelPosition="Left" />
<Control FieldName="System.CreatedDate" Type="FieldControl" Label="Created Date" LabelPosition="Left" />
<Control FieldName="System.CreatedBy" Type="FieldControl" Label="Created By" LabelPosition="Left" />
<Control FieldName="core.resolution" Type="FieldControl" Label="Root Cause" LabelPosition="Left" />
答案 0 :(得分:1)
我找到了使用EMPTY
规则的更好解决方案。您可以像下面这样更改xml:
<FIELD name="Root Cause" refname="core.resolution" type="String">
<ALLOWEDVALUES expanditems="true">
<LISTITEM value="Code" />
......
</ALLOWEDVALUES>
<WHENNOT field="System.State" value="Done">
<EMPTY />
</WHENNOT>
</FIELD>