TFS待办事项中Bug与PBI层级疑问及视图显示设置咨询
Hey there! Let's break down your questions about TFS backlog structure and bug visibility clearly:
Is your understanding of Bug hierarchy correct?
Absolutely, your take is right on target. In TFS's default process templates (like Scrum), Bug is a top-level work item type, on the same hierarchy as PBI (Product Backlog Item).
Even if a Bug originates from a PBI that's already marked as Done (after testing/review), it's treated as an independent backlog item. This is because Bugs can come from multiple sources—not just completed PBIs, but also production issues, regression tests, or other development work. TFS's default setup prioritizes tracking Bugs as separate, actionable items that need their own planning, rather than tying them strictly as child items to PBIs.
Can you display Bugs under PBIs/Tasks in the backlog view?
Yes, you can achieve this view, and there are two main approaches depending on how permanent you want the change to be:
1. Customize the work item type hierarchy (permanent, admin-only)
If your team wants Bugs to always be child items of PBIs by default, you'll need to modify your TFS process template:
- You'll need TFS project administrator permissions
- Open the Process Template Editor, navigate to the Work Item Types section
- Edit the Bug work item type definition to set PBI as its allowed parent
- Update your team project with the modified template
- Once done, new Bugs can be created as direct child items of PBIs, and they'll show up under PBIs in the backlog view automatically
2. Use grouping/querying (no template changes, flexible)
If you don't want to alter the global process template, you can use TFS's built-in grouping or custom queries to visualize Bugs under their associated PBIs:
- Backlog View Grouping: Open your backlog view, click the settings icon (⚙️) in the top-right, select Columns and grouping. Under Group by, choose Parent. As long as you've linked Bugs to their corresponding PBIs as "Parent" work items, they'll collapse under the PBI in the backlog, alongside tasks.
- Tree Query: Create a new custom query, set the query type to Tree of work items. Configure the top-level to fetch PBIs, then add child clauses to pull in linked Tasks and Bugs (using the "Parent" link type). This query will show a hierarchical view of PBIs with their tasks and associated Bugs nested below.
Bonus: Single PBI Bug visibility
If you just want to see Bugs linked to a specific PBI (not the entire backlog), open the PBI's work item page, add the Related Work Items widget, and filter it to show only Bugs linked to that PBI.
内容的提问来源于stack exchange,提问作者BrooklynSon

