TF26049 - 具有不一致规则的字段REQUIRED和EMPTY [英] TF26049 - Field with inconsistent rules REQUIRED and EMPTY

查看:71
本文介绍了TF26049 - 具有不一致规则的字段REQUIRED和EMPTY的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在导入WITD时收到以下错误消息:

I'm get following error message upon importing a WITD:

" TF26049:字段'CB_ChecklistUpdated "有规则"< REQUIRED />'和'< EMPTY />'不一致。"

"TF26049: The field 'CB_ChecklistUpdated' has rules '<REQUIRED />' and '<EMPTY />' that are inconsistent."

我想在进入州时重置字段,但要制作它必须进入下一个状态 - 我再次清空它。我的XML如下所示:

I wanted to reset the field upon entering a state, but making it mandatory to get to the next state - where I empty it again. My XML looks like following:

        < STATE value =" State2">

          < FIELDS>

            < FIELD refname =" CB.ChecklistUpdated">

              < EMPTY />

            < / FIELD>

          < / FIELDS>

        < / STATE>

        < STATE value =" State3">

          < FIELDS>

            < FIELD refname =" CB.ChecklistUpdated">

              < EMPTY />

            < / FIELD>

          < / FIELDS>

        < / STATE>

        <STATE value="State2">
          <FIELDS>
            <FIELD refname="CB.ChecklistUpdated">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="State3">
          <FIELDS>
            <FIELD refname="CB.ChecklistUpdated">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>

...

        < TRANSITION from =" State2" to =" State3">

          < FIELDS>

            < FIELD refname =" CB.ChecklistUpdated">

              < REQUIRED />&
            < / FIELD>

          < / FIELDS>

          < REASONS>&
            < DEFAULTREASON value =" ..." />
$
          < / REASONS>

        < / TRANSITION>

        <TRANSITION from="State2" to="State3">
          <FIELDS>
            <FIELD refname="CB.ChecklistUpdated">
              <REQUIRED />
            </FIELD>
          </FIELDS>
          <REASONS>
            <DEFAULTREASON value="..." />
          </REASONS>
        </TRANSITION>

有什么想法吗?

推荐答案

嗨弗兰克,

感谢您在此发帖。

您无法使用必需规则和空规则,您需要在工作项目归档部分中使用添加必需规则:

You could not use Required rule along with Empty rule, you need to use the add the Required rule in the work item filed section:

<FIELD name="Checklist" refname="CB.ChecklistUpdated" type="String">
        <WHEN field="System.State" value="State3">
          <REQUIRED />
        </WHEN>
      </FIELD>




然后用户无法保存工作项如果你把清单留空。在转换中也使用空规则:

Then the user cannot save the work item if you leave the checklist empty. Also use the empty rule in the transition:

 <TRANSITION from="State2" to="State3">
          <REASONS>
            <DEFAULTREASON value="Work started" />
          </REASONS>
          <FIELDS>
            <FIELD refname="CB.ChecklistUpdated">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </TRANSITION>

当工作项目从"State2"变为"State2"时,清单将被清空。到"State3",用户将在保存工作项时收到错误,将清单值留空。

The checklist will be emptied when the work item stated changed from "State2" to "State3", and the user will get the error if he save the work item leave the checklist value empty.

最好的问候

Limitxiao高

Limitxiao Gao


这篇关于TF26049 - 具有不一致规则的字段REQUIRED和EMPTY的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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