1
votes

Currently Im trying to edit a work item type description in TFS 2013 using Visual Studio Process Editor. I've only exported WIT from server and even though I havent made any changes, when I try to import the WIT, following error message pops up.

TF26049: The field 'Responsible' has rules REQUIRED and EMPTY that are inconsistent.

I've looked through the states, workflows and transitions in the xml to check if REQUIRED and EMPTY rules are used together but cant seem to find what is causing the issue.

Here is the Bug.xml Im trying to import, any help is much appreciated:

  <!-- 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>

Edit: Changing 'Pending Deployment' state rules resolved the issue

1

1 Answers

1
votes

Take a look at the state transition rules. You have some of these conflicting rules if you combine them with the WHENs