We have had a bunch of bugs input into TFS, but we are looking to build a query that will return all bugs that haven't been lined to a test case.
Anyone know how I would get that bug list?
Thanks,
Chris
You should be able to retrive these with a linked query:
Select New Query...
Select type Work Items and Direct Links (instead of Flat List)
Select Bug as the main work item type, and any other criteria you may need
Select Test Case as the type under Filters for linked work items
Finally, select Only return items that do not have the specified links
Related
I'm working in a project with a huge backlog, which structure is defined and can't be changed anymore.
In our Work Breakdown Structure (WBS) we have several epics and their user stories defined. For project reporting purposes we do have "checkpoints" defined.
Each checkpoint has a bunch of epics as predecessors. So only if we have completed all epics, we can pass the checkpoint.
In TFS 2013 I do have a query to display all checkpoints. Checkpoints are a PBI with the title [Checkpoint]. In this query, I get also the predecessors (epics) for this checkpoint.
Now I would like to get all children of these epics (e.g.):
[Checkpoint]"Infrastructure ready"
-Link Type "Predecessor": [Epic] "Set-up TFS"
---Link Type "Child": [Story]"Request project in dev-ops"
---Link Type "Child": [Story]"Set-up Build Environment"
-Link Type "Predecessor": [Epic] "Set-up Development Environment"
---Link Type "Child": [Story] "Create Docker-Container"`
Currently, I'm only able to query for the checkpoints and their predecessors. I'm struggling to get the children of the predecessors in the same query.
Adding a picture of the current situation:
Query with missing children
In the picture, you see that the children of the [Epic] PBI's are missing.
If you mean that you want to list all the Parent and Child work items, then you can create a type of query : Tree of work items. Reference the first screenshot for detials:
If you want to get the Parent and Child work items for a specific work item, then you can create a type of query: Work items and direct links. Reference the second screenshot for details.
UPDATE:
We can not get all work items with their parent and child work items in one query. You can try to specify the specific work item ID in Work items and direct links query, just as the example in my answer, Then you can get the three level work items related to that specific work item. We can only do this with the query, you may want to get all related work items with the three level, but unfortunately that's not supported.
You have to set-up several queries or have different ID with an OR-Query, that shoule works.
I created a TFS Query which works fine if runs as simple flat list query, there are no Terminated items as expected. Note that the brackets [] indicate the grouping.
Team Project = #Project
[ And Work Item Type = Epic
Or Work Item Type = Improvement ]
And State <> Terminated
[ And Iteration Path Under A\B1
Or Iteration Path Under A\B2 ]
Now I want to use this as a query for linked items within a tree query though. In this case I get linked work items in the state Terminated even though I explicitly exclude them in the query. Why is this?
I can imagine that this may be the case due to the children not being terminated, however I still would expect them to be filtered, because in a flat list they are filtered as well.
Which filtered option you select in your query. To find linked children, select Match top-level work items first. To find linked parents, select Match linked work items first.
You can also achieve that result by creating some custom code that uses the tfs api to execute two queries (parent/children) and intersect their results.
When are working with various Work Item types (user stories,Tasks, etc) we assign tags to reference the area of work. This makes it easy to filter the Backlogs items view to find any related stories.
I would like to build a query to identify Work Items where the tags have not yet been assigned.
I know this can be achieved using excel and filtering, however I specifically would like to do this using the queries. Is this possible??
Thanks in advance for any assistance.
Firstly, I have to say that it is not possible to create work item query to show work items which don't contain tags. As you see that the Operator for Tags is Contains or Does Not Contain, it is not possible to use these two operators to filter out these non-tagged work items.
Secondly, as you have more than 100 tags, it is not an effective way to use "Does Not Contain" operator to exclude all tagged work items.
So,
How about you adding a 'Null' tag to all non-tagged work items to specify that these work items don't have any tags? With this approach, you can create a work item query with Tags Contains Null to list these non-tagged work items.
If you don't want to take this approach, you need to work with excel just as you mentioned above, or take Dave's advice to work with API.
I would like create a Flat list of work items query in TFS in which the results contain all of the specified PBI and Bug cases and any Task cases that have no parent.
It's that Task with no parent part that has me perplexed. I cannot see a way that I can do what seems so obvious such as (Parent Link Count = 0) because that attribute is not exposed to me though, strangely, some other link type counts are.
Any ideas?
You need to change the type of your query to the Direct Links query, then choose the option to pull back all work items without any matching links. The results will still be a flat list.
We are using the agile template, and have user story's with linked tasks.
Some user stories assigned to me and some tasks, for users stories, are assigned to me.
What I'm trying to get is all work items that are assigned to me, or work items where a linked work item is assigned to me in a tree of work items view (not flat list)
So right now I have:
any work item in this project and iteration (not closed\resolved, and not a bug)
AND
any linked work items assigned to me (not closed\resolved)
But this returns user stories, where I don't have tasks assigned to me. But if I change the first part of the query to be filter out items not assigned to me the 'Tree of Work Items' is not show for where I only have tasks.
The output I would like would exclude user stories where I don't have tasks, and include users stories where I do... something like this:
User Story 1 --> team member A
---->Task 1a --> me
User Story 2 --> me
---> Task 2a --> team member B
Any ideas what the query would be?
Thanks
What you want is not possible in one single query. The filter you do on the parent and on the child will be combined to an "AND" filter operation.
To get only the parents for which you have tasks, choose the query type "Work Items and Direct Links" and in the child section add a filter on "assigned to = #me" and select the option "Only return items that have specified links".
Seems like that has been improved as of TFS 2012.
You can have a Tree of Work Items, where your linked work items are filtered according to your preferences (assigned to me, not closed, iteration etc.)
Then make sure to add "Filter options" -> Match lined work items first -> Parent/Child
That should filter any parents, not having sub tasks assigned to you and other filters you applied.