Define, capture, triage, and manage bugs

Azure Boards | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2013

How do you track and manage defects in your code? How do you make sure software problems and customer feedback get addressed quickly to support high-quality software deployments? And, how do you do make good progress on new features while addressing your technical debt?

At a minimum, you need a way to capture your software issues, stack rank them, assign them to a team member, and track progress. You'll want to manage your code defects in ways that align with your Agile practices.

To support these scenarios, Azure Boards provides a Bug work item type. The Bug work item type shares all the standard features of other work item types with a few more. For an overview of standard features, see Track work with user stories, issues, bugs, features, and epics.

Extra features for managing bugs include the following:

  • Option for each team to choose how they want to track bugs
  • Test tools to capture bugs
  • Built-in integration across Azure DevOps to track bugs linked to builds, releases, and tests

Note

Bug work item types aren't available with the Basic process. The Basic process tracks bugs as Issues and is available when you create a new project from Azure DevOps Services or Azure DevOps Server 2019.1 or later versions.

Bug work item type

The following image shows the Bug work item type for the Scrum process. The Bug work item type for Agile and CMMI processes tracks similar information. It is designed to appear on the product backlog along with requirements or on the Taskboard along with tasks.

Note

The images you see from your web portal may differ from the images you see in this article. These differences result from updates made to your web app, options that you or your admin have enabled, and which process was chosen when creating your project—Agile, Basic, Scrum, or CMMI. The Basic process is available with Azure DevOps Server 2019 Update 1 and later versions.

Bug work item type, form for Scrum process, Azure DevOps Server 2020 and cloud service.

Bug work item type, form for Scrum process, Azure DevOps Server 2019 and earlier versions to TFS 2017.

Bug work item type, form for Scrum process, TFS 2013 and TFS 2015 versions.

Tip

Use the Discussion section to add and review comments made about the work being performed to resolve the bug.

Fields specific to Bugs

The Bug work item type uses some bug-specific fields. Use the fields described in the following table to capture both the initial issue and ongoing discoveries. For information about fields specific to the CMMI process Bug, see Bugs, issues, and risks field reference. For information about all other fields, see Work item field index.


Field, Group, or Tab

Usage


Steps to Reproduce
(friendly name=Repro Steps)

Use to capture enough information so that other team members can fully understand the code defect. Include actions taken to find or reproduce the bug and expected behavior.


Information about the software and system configuration that is relevant to the bug and tests to apply. The System Info and Found in Build fields are automatically filled in when a bug is created using a testing tool. These fields specify information about the software environment and build where the bug occurred. To learn more about defining the software environments, see Test different configurations.


Provide the criteria to meet before the bug can be closed. Before work begins, describe the customer acceptance criteria as clearly as possible. Teams should use this criteria as the basis for acceptance tests, and to evaluate whether an item has been satisfactorily completed.


Specifies the name of the build that incorporates the code that fixes the bug. This field should be specified when you resolve the bug. For on-premises Azure DevOps, to access a drop-down menu of all builds that have been run, you can update the FIELD definitions for Found in Build and Integrated in Build to reference a global list. The global list is automatically updated with each build that is run. To learn more, see Query based on build and test integration fields.
For information about how to define build numbers, see build number format options.


  • 1: Product should not ship without the successful resolution of the work item. The bug should be addressed as soon as possible.
  • 2: Product should not ship without the successful resolution of the work item, but it does not need to be addressed immediately.
  • 3: Resolution of the work item is optional based on resources, time, and risk.

A subjective rating of the impact of a bug on the project or software system. For example: If choosing a remote link (a rare event) causes an application or web page to crash (a severe customer experience), you might specify Severity = 2 - High and Priority = 3. Allowed values and suggested guidelines are:

  • 1 - Critical: Must fix. A defect that causes termination of one or more system components or the complete system, or causes extensive data corruption. And, there are no acceptable alternative methods to achieve required results.
  • 2 - High: Consider fix. A defect that causes termination of one or more system components or the complete system, or causes extensive data corruption. However, an acceptable alternative method exists to achieve required results.
  • 3 - Medium: (Default) A defect that causes the system to produce incorrect, incomplete, or inconsistent results.
  • 4 - Low: A minor or cosmetic defect that has acceptable workarounds to achieve required results.

The Deployment control supports links to and display of releases that contain work items. To use the control, you must enable settings for the release. To learn more, see Link work items to releases later in this article.


The Development control supports linking to and displaying links made to development objects. These objects include Git commits and pull requests, or TFVC changesets and versioned items. You can define links from the work item or from the commits, pull requests, or other development objects. To learn more, see Link work items to development later in this article.


Notes:

1 To change the menu selection or picklist, see Customize the work tracking experience. The customization method depends on the process model used by your project.

Choose how your team tracks bugs

When determining how your team will track bug, consider the following factors.

  • Size of your team. Smaller teams will want to maintain a lightweight footprint and tracking bugs as requirements may be the most lightweight.
  • Organization requirements to track work. If your team is required to track hours, then tracking bugs as tasks aligns with this requirement.
  • How your team prioritizes work. If your team relies on the product backlog to order work, tracking bugs as requirements supports this activity.
  • Tools your team wants to use such as the Planning pane, velocity chart, forecast, rollup, and delivery plans. Tracking bugs as tasks precludes use of several of these tools.

The following table summarizes the three options teams have to track bugs. To learn more and to set the option for your team, see Show bugs on backlogs and boards.


Option

Choose when you want to...


Track bugs as Requirements

Note

  • Bugs are assigned to the Requirements Category

Track bugs as Tasks

  • Estimate work for bugs similar to tasks
  • Update bug status on sprint Taskboards
  • Link bugs to requirements as child items
  • Can drag and drop bugs onto Planning pane to assign bugs to a sprint

Note

  • Bugs are assigned to the Task Category
  • User Stories (Agile), Product Backlog Items (Scrum), or Requirements (CMMI) are the natural parent work item type for Bugs
  • Bugs won't be visible on Delivery Plans

Bugs don't appear on backlogs or boards

  • Manage bugs using queries

Note

  • Bugs are associated with the Bugs Category and won't appear on either backlogs or boards
  • Bugs won't be visible on Backlogs, Boards, Sprint Backlogs, Taskboards, or Delivery Plans
  • Can't drag and drop bugs onto Planning pane to assign bugs to a sprint

Customize your bug work item type

You can customize your bug work item type or create another work item types to track software issues or customer feedback. With all work item types, you can customize the following elements:

  • Add or remove custom fields
  • Add custom controls or custom tabs within the work item form
  • Customize the workflow states
  • Add conditional rules
  • Choose the backlog level the work item type appears

Before you customize your process, we recommend you review Configure and customize Azure Boards.

To customize your particular process, see Customize an inheritance process.

To customize your particular process, see Customize the On-premises XML process model.

Add or capture bugs

You can define bugs from several different Azure DevOps tools. These include backlogs and boards and testing tools.

Tip

By default, the only required field when creating a bug is the Title field. You can quickly add bugs in the same way you add user stories or product backlog items using Azure Boards. If you want to make some fields required, you can do that by adding conditional rules based on a state change. To learn more, see Add a rule to a work item type (Inheritance process).

Add a bug from your backlog or board

If your team chose to manage bugs with requirements, you can define bugs from your product backlog or Kanban board. To learn more, see Create your product backlog or Start using your Kanban board.

  • Add a bug from the product backlog

    From product backlog, Add bug.

  • Add a bug from the product backlog

    From Kanban board, Add bug.

Tip

When you add a bug from your product backlog or Kanban board, the bug is automatically assigned the default Area Path and Iteration Path defined for the team. To learn more, see Team defaults referenced by backlogs and boards.

Add a bug from your Sprint backlog or Taskboard

If your team chose to manage bugs with tasks, you can define bugs from your Kanban board, product backlog, Sprint backlog, or Sprint Taskboard. You add a bug as a child to a product backlog work item.

  • Add a linked child bug from the Kanban board
    You add a bug in the same way you add a task to a backlog item. To learn more, see Add task checklists.

    From Kanban board, Add child bug to backlog item.

  • Add a linked child bug from the Sprint Backlog
    You add a bug in the same way you add a task to a Sprint backlog. To learn more, see Add tasks to backlog items.

    From Sprint backlog, Add child bug to backlog item.

Create a bug from a testing tool

The two testing tools you can use to add bugs while testing include the web portal Test Runner and the Test & Feedback extension.

Bug lifecycle and workflow states

As with all other work item types, the Bug work item type has a well-defined workflow. Each workflow consists of three or more States and a Reason. Reasons specify why the item transitioned from one State to another. The following images illustrate the default bug workflow defined for the Agile, Scrum, and CMMI processes.

Agile Scrum CMMI
Bug workflow states, Agile process template Bug workflow states, Scrum process template Bug workflow states, CMMI process template

For Scrum bugs, you simply change the State from Committed (similar to Active) to Done. For Agile and CMMI, you first resolve the bug, indicating that the bug has been fixed. Typically, the person who created the bug then verifies the fix and updates the State from Resolved to Closed. If more work has been found after a bug has been resolved or closed, it can be reactivated by setting the State to Committed or Active.

Note

The Agile process bug work item type previously had a rule which reassigned the bug to the person who created it. This rule has been removed from the default system process. You can reinstate this automation by adding a rule. For an Inheritance process, see Apply rules to workflow states, Automate reassignment based on state change.

Verify a fix

To verify a fix, a developer or tester should attempt to reproduce the bug and look for more unexpected behavior. If necessary, they should reactivate the bug.

When verifying a bug resolution, you may find that the bug was not completely fixed or you may disagree with the resolution. In this case, discuss the bug with the person who resolved it, come to an agreement, and possibly reactivate the bug. If you reactivate a bug, include the reasons for reactivating the bug in the bug description.

Close a bug

You close a bug once it's verified as fixed. However, you may also close a bug for one of these reasons:

  • Deferred - deferring a fix until the next product release
  • Duplicate - bug has already been reported, you can link each bug with the Duplicate/Duplicate of link type and close one of the bugs
  • As Designed - feature works as designed
  • Cannot Reproduce - tests prove that the bug can't be reproduced
  • Obsolete - the bug's feature is no longer in the product
  • Copied to Backlog - a PBI or user story has been opened to track the bug

Tip

Once a bug has been closed and the fix is actively released in deployments, recommended practice is to never reopen it due to regression. Instead, you should consider opening a new bug and link to the older, closed bug.

It's always a good idea to describe any more details for closing a bug in the Discussion field to avoid future confusion as to why the bug was closed.

Automate bug closure when merging pull requests

If your team uses a Git repository, you can set the State in linked bugs and other work items to close upon successful merging of pull requests. For more information, see Set work item state in pull request later in this article.

List and triage bugs

Most teams, regardless of the option they chose to track bugs, define one or more bug queries. With queries, you can list active bugs, unassigned bugs, stale bugs, bug trends, and more. You can then add queries and query charts to your team dashboards to monitor bug status and progress.

Bug queries

Open a shared query or use the query editor to create useful bug queries, such as the following:

  • Active bugs by priority (State <> Done or State <> Closed)
  • In Progress bugs (State = Committed or State = Active)
  • Bugs to fix for a target release (Tags Contains RTM)
  • Recent bugs - bugs opened within the last three weeks (Created Date > @Today-21)

Once you have the queries of interest to your team, you can create status or trend charts. You can also add the chart you create to a dashboard.

Triage mode in query results

Once you've started coding and testing, you'll want to hold periodic triage meetings to review and prioritize your bugs. Typically, the project owner runs the bug triage meetings, and team leads, business analysts and other stakeholders who can speak about specific project risks attend them.

The project owner can define a shared query for new and reopened bugs to list bugs to be triaged.

From the query results page, you can quickly move up and down within the list of bug work items using the up and down arrows. As you review each bug, you can assign it, add details, or set priority. To learn more, see Triage work items.

Screenshot of Query Results, Active Bugs, and Triage mode Right pane.

Prioritize and assign bugs to a sprint

If your team tracks bugs as requirements, you can view the list of active bugs from your backlog. With the filter function, you can focus solely on bugs. From the product backlog, you can also perform the following tasks:

If your team tracks bugs as tasks, you'll use managed queries to list and triage bugs. Then, within each sprint, you'll see those bugs that are assign to the sprint from the Sprint backlog or Taskboard.

Taskboard items versus query list items

You may notice and wonder why the items shown on a sprint Taskboard may differ from those listed in a query created from its corresponding sprint backlog.

It's possible to assign tasks or bugs to an iteration but not have them linked to a parent backlog item. These items will show up in the created query, but might not show up on the Taskboard itself. The system runs the query and then applies a few background processes before displaying Taskboard items.

These reasons can cause work items that belong to the Task Category to not appear on a sprint backlog or Taskboard:

  • The task or bug hasn't been linked to a parent backlog item. Only those bugs and tasks that you have linked to a parent product backlog item (Scrum), user story (Agile), or requirement (CMMI) whose iteration path is set to the sprint will appear on the sprint backlog page.
  • The task or bug is a parent of another task or bug, or the user story is a parent of another user story. If you've created a hierarchy of tasks, bugs, or user stories, only the child-level tasks or the child-level stories at the bottom of the hierarchy appear.
  • The task's or bug's linked parent corresponds to a backlog item defined for another team. Or, the area path of the task's or bug's parent backlog item differs from the task's or bug's area path.

Create inline tests linked to bugs

When your team tracks bugs as requirements, you can use the Kanban board to add tests to verify bug fixes.

Screenshot of Kanban board, 3 columns showing inline tests added and linked to bugs.

Update bug status

You can update the bug status by dragging and dropping bugs to a new column on a board.

Customize your board to track intermediate states

You can add intermediate columns to track your bug status on the board. You can also define queries that filter based on the status of a Board Column. To learn more, see the following articles:

Automate bug reassignment based on workflow state

To automate select actions, add custom rules to your Bug work item type. For example, you can add a rule as shown in the following image. This rule specifies to reassign a bug to the person who opened the bug once it is resolved. Typically, that person verifies that the bug is fixed and closes the bug. To learn more, see Apply rules to workflow states (Inheritance process).

Screenshot of rule defined to reassign bug based on resolved state.

Set work item state in pull request

When you create a pull request, you can set the state value of the linked work items in the description. Follow the syntax: {state value}: #ID. When you merge the pull request, the system reads the description and updates the work item state. In the following example, we set work items #300 and #301 to Resolved, and #323 and #324 to Closed.

Screenshot of setting work item state within a PR.

Note

This feature requires installation of Azure DevOps Server 2020.1 update. To learn more, see Azure DevOps Server 2020 Update 1 RC1 Release Notes, Boards.

Integration across Azure DevOps

One of the methods used by Azure DevOps to support integration is to link objects to other objects. In addition to linking work items to work items, you can also link work items to other objects such as builds, releases, branches, commits, and pull requests as illustrated in the following image.

Conceptual image that shows link types used to link work items to build and release objects.

You can add a link from the work item or from the build and release objects.

The Development control supports linking to and displaying links made to builds, Git commits and pull requests. Or, when a TFVC repository is used, it supports links to changesets and versioned items. Choosing the link opens the corresponding item in a new browser tab. To learn more, see Drive Git development from a work item.

Development control on work item form with sample links to build, pull requests, and commits.

The Deployment control supports links to and display of releases that contain the work items. For example, the following image shows several releases that contain links to the current work item. You can expand each release to see details about each stage. You can choose the link for each release and stage to open the corresponding release or stage. To learn more, see Link work items to deployments.

Deployment control on work item form with sample releases.

Pipelines are often defined to automatically run when a new commit occurs to a Git repository. Work items associated with the commit pipelines will show up as part of the pipeline run if you customize your pipeline settings. To learn more, see Customize your pipeline.

Screenshot of Pipeline Settings, Automatically link work items in this run from selected branch.

Create or edit a work item upon a build failure

If you use classic pipelines (not YAML), you can create work items on a build failure. For details, see Build options, Create a work item on failure.

You can track the bug status, assignments, and trends using queries that you can then chart and add to a dashboard. For example, here are two examples showing active bug trends by State and Active Bugs by Priority over time.

Screenshot of two active bug query charts, Bug Trends by State and by Priority.

To learn more about queries, charts, and dashboards; see About managed queries and Charts, and Dashboards.

Use Analytics views and the Analytics service to create bug reports

The Analytics service is the reporting platform for Azure DevOps, replacing the previous platform based on SQL Server Reporting Services.

Analytics views provide pre-built filters to view work items. Four Analytic views are supported for bug reporting. You can use these as defined or further edit them to create a custom, filtered view.

  • Bugs - All history by month
  • Bugs - Last 26 weeks
  • Bugs - Last 30 days
  • Bugs - Today

To learn more about using Analytic views, see What are Analytics views and Create an active bugs report in Power BI based on a custom Analytics view.

You can use Power BI to create more complex reports than what you can get from a query. To learn more, see Connect with Power BI Data Connector.

Pre-defined SQL Server bug reports

The following reports are supported for Agile and CMMI processes.

These report require you have SQL Server Analysis Services and SQL Server Reporting Services configured for your project. To learn how to add SQL Server reports for a project, see Add reports to a project.

Marketplace extensions

There are a number of bug-related Marketplace extensions. See Marketplace for Azure DevOps.

For additional information on extensions, see Azure Boards extensions developed by Microsoft.

Try this next

Product backlog and Kanban board

Kanban board

Sprint backlog and Taskboard

Integration within Azure DevOps

Industry resources