导入工作项类型说明

时间:2018-02-27 14:03:06

标签: tfs tfs2013 tfs-workitem tfs-power-tools

目前我正在尝试使用Visual Studio Process Editor在TFS 2013中编辑工作项类型说明。我只从服务器导出WIT,即使我没有做任何更改,当我尝试导入WIT时,会弹出以下错误消息。

  

TF26049:该字段'负责任'有必要的规则和EMPTY不一致。

我查看了xml中的状态,工作流程和转换,以检查是否一起使用了REQUIRED和EMPTY规则,但似乎无法找到导致问题的原因。

这是我试图导入的Bug.xml,非常感谢任何帮助:

    

  <!-- Removed some fields due to being too long-->

  <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
    <ALLOWEXISTINGVALUE />
    <VALIDUSER />
  </FIELD>

  <FIELD name="Responsible" refname="Microsoft.VSTS.CMMI.Responsible" type="String" reportable="dimension">
    <VALIDUSER />
  </FIELD>
</FIELDS>
<WORKFLOW>
  <STATES>
    <STATE value="Active">
      <FIELDS>
        <FIELD refname="System.AssignedTo">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ReportedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="VpBug.AnalysisOutcome">
          <WHEN field="VpBug.AnalysisPerformed" value="Yes">
            <REQUIRED />
          </WHEN>
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Resolved">
      <FIELDS>
        <FIELD refname="System.AssignedTo">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ReportedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Closed">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <READONLY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <ALLOWEXISTINGVALUE />
          <READONLY />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ReportedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Proposed">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <EMPTY />
        </FIELD>
        <FIELD refname="VRP.Environment">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <ALLOWEXISTINGVALUE />
          <READONLY />
          <DEFAULT from="field" field="Microsoft.VSTS.CMMI.Responsible" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ReportedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Rejected">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <READONLY />
          <DEFAULT from="field" field="Microsoft.VSTS.CMMI.RootCause" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <READONLY />
          <DEFAULT from="field" field="Microsoft.VSTS.CMMI.Responsible" />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Pending Deployment">
      <FIELDS>
        <FIELD refname="System.AssignedTo">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <READONLY />
          <WHEN field="VpBug.AnalysisOutcome" value="Software Defect">
            <ALLOWEXISTINGVALUE />
            <REQUIRED />
          </WHEN>
          <DEFAULT from="field" field="Microsoft.VSTS.CMMI.RootCause" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <EMPTY />
          <WHEN field="VpBug.AnalysisOutcome" value="Software Defect">
            <ALLOWEXISTINGVALUE />
            <VALIDUSER />
            <REQUIRED />
          </WHEN>
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ReportedBy">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
      </FIELDS>
    </STATE>
  </STATES>
  <TRANSITIONS>
    <TRANSITION from="Proposed" to="Active">
      <REASONS>
        <DEFAULTREASON value="Approved" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="VpBug.AnalysisOutcome">
          <WHEN field="VpBug.AnalysisPerformed" value="Yes">
            <REQUIRED />
          </WHEN>
        </FIELD>
      </FIELDS>
      <ACTIONS>
        <ACTION value="Microsoft.VSTS.Actions.StartWork" />
      </ACTIONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Resolved">
      <REASONS>
        <DEFAULTREASON value="Fixed" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Closed" to="Resolved">
      <REASONS>
        <DEFAULTREASON value="Closed by error" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Pending Deployment" to="Resolved">
      <REASONS>
        <DEFAULTREASON value="Fixed" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <SERVERDEFAULT from="clock" />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <REQUIRED />
          <WHEN field="VpBug.AnalysisOutcome" value="Software Defect">
            <ALLOWEXISTINGVALUE />
            <REQUIRED />
          </WHEN>
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
          <WHEN field="VpBug.AnalysisOutcome" value="Software Defect">
            <ALLOWEXISTINGVALUE />
            <VALIDUSER />
            <REQUIRED />
          </WHEN>
        </FIELD>
      </FIELDS>
      <ACTIONS>
        <ACTION value="Microsoft.VSTS.Actions.Checkin" />
      </ACTIONS>
    </TRANSITION>
    <TRANSITION from="Resolved" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Verified" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Rejected" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Not a Defect">
          <FIELDS>
            <FIELD refname="System.Reason">
              <READONLY />
            </FIELD>
          </FIELDS>
        </DEFAULTREASON>
        <REASON value="As Designed" />
        <REASON value="Deferred" />
        <REASON value="Duplicate" />
        <REASON value="Obsolete" />
        <REASON value="Overtaken by events" />
        <REASON value="Unable to Reproduce" />
        <REASON value="Coppied to backlog" />
        <REASON value="Known Issue" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <DEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <DEFAULT from="currentuser" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="" to="Proposed">
      <REASONS>
        <DEFAULTREASON value="New" />
      </REASONS>
      <FIELDS>
        <FIELD refname="System.AssignedTo">
          <ALLOWEXISTINGVALUE />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.TCM.ReproSteps">
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <ALLOWEXISTINGVALUE />
          <VALIDUSER />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Active" to="Proposed">
      <REASONS>
        <DEFAULTREASON value="Unable to Reproduce" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.CMMI.RootCause">
          <EMPTY />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Resolved" to="Proposed">
      <REASONS>
        <DEFAULTREASON value="Not fixed" />
        <REASON value="Test Failed" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
      </FIELDS>
      <ACTIONS>
        <ACTION value="Microsoft.VSTS.Actions.StartWork" />
      </ACTIONS>
    </TRANSITION>
    <TRANSITION from="Closed" to="Proposed">
      <REASONS>
        <DEFAULTREASON value="Reoccurred" />
        <REASON value="Reopened by Client" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.CMMI.Responsible">
          <ALLOWEXISTINGVALUE />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="System.AssignedTo">
          <DEFAULT from="currentuser" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Rejected" to="Proposed">
      <REASONS>
        <DEFAULTREASON value="Its a Bug" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Proposed" to="Rejected">
      <REASONS>
        <DEFAULTREASON value="Not a Defect" />
        <REASON value="As Designed" />
        <REASON value="Deferred" />
        <REASON value="Duplicate" />
        <REASON value="Obsolete" />
        <REASON value="Overtaken by events" />
        <REASON value="Unable to Reproduce" />
        <REASON value="Coppied to backlog" />
        <REASON value="Known Issue" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Pending Deployment">
      <REASONS>
        <DEFAULTREASON value="Pending Deployment" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
  </TRANSITIONS>
</WORKFLOW>

修改:更改&#39;待处理部署&#39;州规则解决了问题

1 个答案:

答案 0 :(得分:1)

看一下状态转换规则。如果将它们与WHENs

结合使用,则会出现一些相互冲突的规则