tfsmsbuildoctopus-deployvnext

Associating Build Number with TFS Work Items after build using vNext


We have a requirement of associating work items with TFS Builds. Generally, this is possible (or we can say 'natural') while using XAML Build Templates in TFS (via Integration Build field of WorkItem. In the below screenshot it was mentioned as 'Integrated In'). We are currently trying to migrate from XAML Build Templates to vNext version of VSTFS 2015 and further to integrate with Octopus Deploy for CI/CD practices.

We are now half the way in the migration because we are stuck up making this vNext templates to associate TFS WorkItems with their Build numbers. Without doing this step, if we complete this migration, it will be difficult to get associated build numbers for each Work Items delivered in that build.

When we searched MSDN blogs, we got a post (link given below) similar to our requirement but I tried that and ended up with no luck.

https://blogs.msdn.microsoft.com/tfssetup/2016/05/09/build-association-with-work-items-in-vnext/

So, please suggest the ways which can resolve our requirement.


Solution

  • Since you are going to migrate from XAML build Templated to vNext. Suggest you also upgrade your TFS version to higher all together.

    Just as Daniel point out TFS2015 released already 4 years, kind of little old. Same latest feature in TFS/Azure DevOps are not supported.

    What you are looing for is a build-in option in TFS2017 update2 and above version.

    Automatic linking from work items to builds

    With this new setting in the build definition, you can track the builds that have incorporated your work without having to search through a large set of builds manually. Each successful build associated with the work item automatically appears in the development section of the work item form.

    To enable this feature, toggle the setting under Options in your build definition.

    enter image description here

    More details refer this blog.

    Besides, you could also take a look at our official tutorial Migrate from XAML builds to new builds in case you need.