user1374843
user1374843

Reputation: 95

TFS: Change state category of custom added state

In TFS I added a new state to our workflow Ready to Test. The state however behaves like it is part of the Removed state category. How can I change the category of the state so the backlogitems do not disappear from the backlog when I change the workitem to this state?

I found information about state categories here, but there is no information on how to modify the xml on-premise template to add a custom state to a category.

This question seems duplicate from TFS: Change state category however the answer in that question is about adding work item types to a category, not work item states.

Upvotes: 1

Views: 656

Answers (1)

user1374843
user1374843

Reputation: 95

After some trial and error I discovered the following:

The state Ready to Test and it's transitions were added to the Bugs.xml and Product Backlog Item.xml templates. This enables the changing of the state for bugs and PBI's to the state Ready to Test. However, now it behaves like a state of the category Deleted.

In the processconfig.xml file there are also states defined for BugWorkItems. Here you can assign a type to the state. Here I added the state as well with the type InProgress. I expected the state to behave like an 'In Progress' state now for bug types. I searched for a section ProductBacklogItemWorkItems but could not find this section or something similar. However for some reason the change of the state for bugs also changed the behavior of the state for PBI's. So if I change a PBI to the state Ready to Test it will no longer disappear from the backlog, but behaves like it's still in progress, as I wanted.

This change therefore fixed my problem.

Here is the start of the processconfig.xml with my new state:

<?xml version="1.0" encoding="utf-8"?>
<ProjectProcessConfiguration>
  <BugWorkItems category="Microsoft.BugCategory" pluralName="Bugs" singularName="Bug">
    <States>
      <State type="Proposed" value="New" />
      <State type="Proposed" value="Approved" />
      <State type="InProgress" value="Committed" />
      <State type="InProgress" value="Ready to Test" />
      <State type="Complete" value="Done" />
    </States>
  </BugWorkItems>
  ...
</ProjectProcessConfiguration>

Upvotes: 2

Related Questions