VSTS: How to get all linked work items since last successful release to production?
Asked Answered
S

2

2

We are using Visual Studio Team Services w/ Git and VSTS Release Management. We are running a continuous delivery model using pull requests. So each merged pull request triggers a potential release from an according build that ultimately would end up in production.

Each release lists the linked work items associated to the according direct pull request. VSTS states:

All work items that were included in commits will be displayed in the below list. Comparing current release with %previous release%.

However, not all pull requests make it to production, although they have been merged into the codebase already. That means, subsequent builds are actually based on such (not released) pull requests referring not only to the directly linked work items (from the pull request) but also to the work items of all the (not yet released) pull requests. These work items however, are currently not visible in the "Work Items" overview, which is an issue for our QAs.

Is there an official way to get a list of all previously linked work items associated to that (current) release compared to the last successful release on production? In other words: I am looking for a way to get the change log of the release that is going to go live (relative to the last complete release).

I've already tried to use the VSTS REST API https://www.visualstudio.com/en-us/integrate/api/overview but couldn't find suitable functions there.

Soppy answered 13/4, 2016 at 13:28 Comment(0)
S
3

Meanwhile I've found a workaround for my problem. As of now the VSTS REST Api (version 1.0) does not support querying release or build information. However, it knows pull requests: https://www.visualstudio.com/integrate/api/git/pull-requests and work items: https://www.visualstudio.com/integrate/api/wit/work-items

A pre-condition for this to work is that you link your pull requests with your work items. The moment a pull request gets merged into master, it usually mentions linked work items in the commit message. This is, how I currently can resolve all work items linked to these (completed) pull requests that have been merged between two dates (e.g. last release and now).

It's not the best solution but it works.

Soppy answered 15/4, 2016 at 13:47 Comment(2)
Have you found any better solution in the meantime? Otherwise I will try to use the suggested workaroundOlszewski
Nope, I didn't try to find a better solution. It was sufficient for our QA guys. They were able to filter upcoming work items based on the date of the last release.Soppy
T
1

In version 5.0 preview of the API it seems to now support "Get Work Items Between Builds". Note that the fromBuildId and toBuildId parameters should be populated with the buildId, not the build number displayed on the UI. You can get the buildId by navigating to a specific build, and copying the buildId out of the URL.

Trotta answered 26/4, 2019 at 20:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.