简体   繁体   中英

Azure DevOps: Query work items by state of related items

I've recently been playing around with the Predecessor/Successor relationship between user stories within a feature; an example would be, I have to complete the "The widget list needs to be grouped into a tree-view by location" before I can work on "Add my cool new widget into the 'Manager Office' location node". It makes for a nice little tree of items where, when someone wants to start working on a story, they have a direct link to make sure there's nothing else that needs to be finished first. However, I can't seem to find a way to query stories based on the state of that related item.

Basically, I want to say, "Show me all user stories that are not resolved and either have no predecessors or all of their predecessors are resolved." I'm working from the Queries tab under Boards, and the only query option I see that's even vaguely related is the "Related Link Count". I'm not entirely sure that what I want to do is possible via the web interface.

I want to say, "Show me all user stories that are not resolved and either have no predecessors or all of their predecessors are resolved."

You could use the Type of query Work items and direct links to view dependencies.

As test, I have created two workitems, child and parents , which parents state is Closed and Child state is New .

Then created another two workitems, child2 and parents2 , which parents2 state is New Not closed or Resolved .

在此处输入图片说明

Now, I use following union query, I could get the user stories that are not resolved and either have no predecessors or all of their predecessors are resolved.

在此处输入图片说明

Hope this helps.

That looks more like a parent/child filter to me with no mention of predecessors. Here's how I did it:

  • Like the first example, I chose "Work items and direct links".
  • In my case I was looking for items with "DOCS:" in the title, in a particular area.
  • I also wanted to exclude any that were closed or removed.

For the linked items, by choosing "Only return items that do not have matching links" I was able to filter out work items that had a predecessor that is not closed or removed.

This means items with no predecessors are included in the result, as are items whose predecessors are all closed or removed.

查询没有待处理前置任务的工作项

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM