azure-devopsazure-pipelinesazure-boardsazure-devops-services

How to add Builds to "Found in Build" in Azure DevOps Services


We are using Azure DevOps Services to manage Bug Reports on our product. As part of filling out a bug report, we want people to fill out the version the bug occurred in.

Question

Is the Dropdown Field "Found in Build" (Microsoft.VSTS.Build.FoundIn) get populated with Buildnumbers under Azure DevOps Services?

Setup

Azure DevOps Services has two ways to filling out this information, both seem to be related to Azure Pipelines.

  1. Set up a link using the "Found in Build" link type. This works, but the interface is complicated and not intuitive.
  2. Select from the Dropdown Menu also called "Found in Build", which should display a simple list of builds/versions to select from.

Since we don't have a full CI/CD setup yet, we have created a dummy pipeline for the sole purpose of creating build numbers that should then appear in the bug report form.

I have created this pipeline and ran some builds to generate build numbers. I can also select them using the link method (1.), which adds a link as expected. The dropdown method, however, does not show any build numbers:

Found in Build...

Azure DevOps Bug Report Form Field "Found in Build", empty

Considerations

While it is possible to use the links for linking a bug to a build, there are some things to consider

While it is possible to create a build task that fills the Found In/Integrated In dropdown with the current build, this does not add the field to the dropdown list

What I've found so far

Hi, the Microsoft.VSTS.Build.IntegrationBuild field can not be used to get the build links for VSTS, since the Microsoft.VSTS.Build.IntegrationBuild field is designed for the XAML build (not vNext build). And you can also find relation information in the blog Automatic linking work items to builds:The build fields are populated with build numbers only for XML builds. This will continue to work as is for XML builds. The new build system does not populate these fields.



Solution

  • Few things to add...

    This field used to be populated when it was used as part of XML-based (XAML) "Team Build" builds. "Team Build" was replaced with web-based UI pipelines (now referred to as "Classic" which have fallen out of favour for YAML-based builds). XAML-based Team Build was slated to be removed from the product in TFS-2018 but was brought back for legacy-conversion reasons. The quote from 2019 you've referenced, highlights that this field no longer get populated:

    The build fields are populated with build numbers only for XML builds. This will continue to work as is for XML builds. The new build system does not populate these fields.

    Why this field continues to be a drop-down is an amusing anecdote, at best. Somewhere on the planet, someone has a TFS 2018 environment that is still using a TFS 2015 build agent that might be using a XAML-based build and maybe populating this field. Chances are: no one has noticed, no one sees this as a priority, or no one wants to be responsible for breaking compatibility on something that technically is still supported. Or maybe it's because the majority of other fields on the screen are also dropdowns and it's difficult to change?

    This field remains in the UI as a text-box because it can be queried. As you've pointed out, the "Found in Build" link cannot be used in query.

    Regarding the "Found In Build" link, it is automatically populated if you're using the Test & Feedback extension or when running your Test Plan manually.

    The following shows that the most recent build and the Test Case that was used to discover the Bug are automatically linked when it's created through the tools mentioned above:

    Defect