How do you query for work items that didn't pass through a given state?
I have a team using RTC who use a code review process empowered by the RTC-CodeCollaborator integration. This integration is driven by adding a new state to a work item type or types. In this case, the Task workflow had a "Ready for Review" state added. This state is reachable from "In Progress" by using the "Submit for Review" action. The Task goes from Ready for Review to Complete by way of the "Complete Review" action.
Our code review process is mandatory. Therefore, we need to query for completed tasks that didn't go through our Code Review workflow state. How does one do this? Can it be done in RTC 3.x without having to write some code?
One answer
Work item queries can only look at the current state of a work item. They can't query on past states of the work item. There is no way to create a work item query that will find all of your work items that were completed without having gone through the Ready for Review state.
Reports can look at the past state of work items. It might be possible to create a report that will find all the work items that you want. But I don't know enough about writing reports to be sure.
(I assume that you have changed your workflow so that from now on work items have to go through the Ready for Review state to get to the Complete state. This way there will never be any new work items that skip the Ready for Review state.)