tfstfs-workitemazure-boards

Upgraded TFS 2013 to DevOps 2018. Now the Boards, Backlogs, and Sprints are not working. Error TF400507


We upgraded our TFS 2013 server to DevOps 2018 and now when we go to Boards, Backlogs, and Sprints we get the following error:

TF400917: The current configuration is not valid for this feature. This feature cannot be used until you correct the configuration. The following element contains an error: BugWorkItems/BugWorkItems. TF400507: Each work item type must support an initial state value that matches one of the states defined in: BugWorkItems. The following work item types have initial states that do not include any states defined in the bug state configuration: Bug.

I downloaded the processconfig.xml and looked at the BugWorkItems section but it looks correct.

  <BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
    <States>
      <State type="Proposed" value="New" />
      <State type="InProgress" value="Active" />
      <State type="Complete" value="Closed" />
      <State type="Resolved" value="Resolved" />
    </States>
  </BugWorkItems>

I also downloaded the Bug.xml but I don't see anything in the file with the tag "initial state".
So I'm not sure what it means by "must support an initial state value"...

Here is the WORKFLOW section.

    <WORKFLOW>
  <STATES>
    <STATE value="Active">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <EMPTY />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <ALLOWEXISTINGVALUE />
          <EMPTY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Closed">
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ResolvedReason">
          <READONLY />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Code Review">
      <FIELDS>
        <FIELD refname="Custom.Developer">
          <ALLOWEXISTINGVALUE />
          <REQUIRED for="[global]\Developers" />
          <REQUIRED not="[global]\ITProjectManagers" />
        </FIELD>
      </FIELDS>
    </STATE>
    <STATE value="Acceptance Testing" />
    <STATE value="Beta" />
    <STATE value="On Hold" />
    <STATE value="QA Testing" />
    <STATE value="Ready For Beta" />
    <STATE value="Ready For Prod" />
    <STATE value="Requirement" />
  </STATES>
  <TRANSITIONS>
    <TRANSITION from="Closed" to="Active">
      <REASONS>
        <DEFAULTREASON value="Regression" />
        <REASON value="Reactivated" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="System.AssignedTo">
          <COPY from="field" field="Microsoft.VSTS.Common.ResolvedBy" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Beta" to="Active">
      <REASONS>
        <DEFAULTREASON value="Returned to Development" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Happy Customer" />
        <REASON value="Cancelled" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <SERVERDEFAULT from="currentuser" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="Active">
      <REASONS>
        <DEFAULTREASON value="Back in Business" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="Beta" for="[global]\ITProjectManagers">
      <REASONS>
        <DEFAULTREASON value="Back in Business" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Acceptance Testing" to="Closed" for="[global]\ITProjectManagers">
      <REASONS>
        <DEFAULTREASON value="Happy Customer" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <SERVERDEFAULT from="currentuser" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="QA Testing" to="Beta">
      <REASONS>
        <DEFAULTREASON value="PASSED QA TESTING" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="QA Testing" to="Active">
      <REASONS>
        <DEFAULTREASON value="Back to Development" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Beta" to="Ready For Prod">
      <REASONS>
        <DEFAULTREASON value="Passed Beta - Ready to Deploy" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Ready For Beta">
      <REASONS>
        <DEFAULTREASON value="Development is done" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Ready For Beta" to="Active">
      <REASONS>
        <DEFAULTREASON value="Not Ready Yet" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Ready For Beta" to="QA Testing">
      <REASONS>
        <DEFAULTREASON value="Ready to be moved to Beta" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Beta" to="On Hold">
      <REASONS>
        <DEFAULTREASON value="Waiting on Resources" />
        <REASON value="Waiting on 3rd Party" />
        <REASON value="Waiting on Development" />
        <REASON value="Waiting on Requirements" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Ready For Prod" to="On Hold">
      <REASONS>
        <DEFAULTREASON value="Waiting on Resources" />
        <REASON value="Waiting on 3rd Party" />
        <REASON value="Waiting on Development" />
        <REASON value="Waiting on Requirements" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="QA Testing" to="On Hold">
      <REASONS>
        <DEFAULTREASON value="Waiting on Resources" />
        <REASON value="Waiting on 3rd Party" />
        <REASON value="Waiting on Development" />
        <REASON value="Waiting on Requirements" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="On Hold">
      <REASONS>
        <DEFAULTREASON value="Waiting on Requirements" />
        <REASON value="Waiting on Development" />
        <REASON value="Waiting on Resources" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="1" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Ready For Beta" to="On Hold">
      <REASONS>
        <DEFAULTREASON value="Waiting for Resources" />
        <REASON value="Waiting for Development" />
        <REASON value="Waiting for Requirements" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="" to="Requirement">
      <REASONS>
        <DEFAULTREASON value="New" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedBy">
          <ALLOWEXISTINGVALUE />
          <COPY from="currentuser" />
          <VALIDUSER />
          <REQUIRED />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ActivatedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="System.AssignedTo">
          <DEFAULT from="value" value="Unassigned User" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <DEFAULT from="value" value="25" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Scheduling.CompletedWork">
          <DEFAULT from="value" value="0" />
        </FIELD>
        <FIELD refname="Custom.TestEstimate">
          <DEFAULT from="value" value="15" />
        </FIELD>
        <FIELD refname="Custom.StepsReproduce">
          <REQUIRED for="[global]\Project Collection Valid Users" />
        </FIELD>
        <FIELD refname="Custom.ServiceAgreement">
          <DEFAULT from="value" value="Bug" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.TCM.ReproSteps">
          <REQUIRED />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Requirement" to="Active">
      <REASONS>
        <DEFAULTREASON value="Active" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Active" to="Code Review">
      <REASONS>
        <DEFAULTREASON value="Code Complete" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Code Review" to="Ready For Beta">
      <REASONS>
        <DEFAULTREASON value="Passed Code Review" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Code Review" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Cancelled" />
        <REASON value="Complete" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Requirement" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Cancelled" />
        <REASON value="Complete" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Requirement">
      <REASONS>
        <DEFAULTREASON value="Need Requirements" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="1" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Cancelled" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="Ready For Prod" for="[global]\ITProjectManagers">
      <REASONS>
        <DEFAULTREASON value="Ready for Production" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="Ready For Beta">
      <REASONS>
        <DEFAULTREASON value="Ready to Deploy to BETA" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="On Hold" to="QA Testing">
      <REASONS>
        <DEFAULTREASON value="Ready for QA Testing" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.StackRank">
          <COPY from="value" value="0" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Beta" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Cancelled" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
        <FIELD refname="Microsoft.VSTS.Common.ClosedBy">
          <SERVERDEFAULT from="currentuser" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Ready For Prod" to="Closed">
      <REASONS>
        <DEFAULTREASON value="Cancelled" />
      </REASONS>
      <FIELDS>
        <FIELD refname="Microsoft.VSTS.Common.ClosedDate">
          <SERVERDEFAULT from="clock" />
        </FIELD>
      </FIELDS>
    </TRANSITION>
    <TRANSITION from="Ready For Prod" to="Acceptance Testing">
      <REASONS>
        <DEFAULTREASON value="Ready for Acceptance Testing" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Acceptance Testing" to="Ready For Prod" for="[global]\ITProjectManagers">
      <REASONS>
        <DEFAULTREASON value="Back to QA" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Code Review" to="Active">
      <REASONS>
        <DEFAULTREASON value="Back to Developer" />
      </REASONS>
    </TRANSITION>
    <TRANSITION from="Active" to="Acceptance Testing" for="[global]\ITProjectManagers">
      <REASONS>
        <DEFAULTREASON value="No Development Required" />
      </REASONS>
    </TRANSITION>
  </TRANSITIONS>
</WORKFLOW>

Solution

  • Each process in Azure DevOps has 4 meta-states. These higher level states must be mapped to your workflow states in each work item type.

    At this point your BugWorkItems has these 4 mappings:

     <BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
        <States>
          <State type="Proposed" value="New" />
          <State type="InProgress" value="Active" />
          <State type="Complete" value="Closed" />
          <State type="Resolved" value="Resolved" />
        </States>
      </BugWorkItems>
    

    And of those 4, the state New and Resolved are missing from your Bug's WORKFLOW definition.

    You have a few options...

    The same applies to the Resolved state.