I have a requirement to assign a VSTS bug item to be fixed in next release using VSTS Rest API. I'm assuming "Microsoft.VSTS.Build.IntegrationBuild" is the field to update with next release version. However this field is not available in VSTS bug item UI(Build and test integration field reference). I also need to retrieve the next release information for the project via VSTS API, Is it possible to do this with current VSTS Rest API? Please advice.
Thanks in advance.
There isn’t the REST API to link bug work item to release. Also, we can’t to do it through UI (e.g. web access)
The work item be linked to the build can be track in the release. So you can link work item to changeset (REST API or manually), then the build associate to this changeset will associate that work item.
Related
I am looking for a way to produce all TFS Work Items from a Jenkins promote job.
We have an on prem deployment of TFS with service hooks in place to build the corresponding applications on check-in. The changeset Id is included with the notification, but I need the TFS work item for that Changeset.
More importantly - we will have several builds run; each with a singular changeset before we actuall run the promotion job.
What I would like to do is find a way to produce the list of TFS work items between releases. Looking a plug-in or tool that will help produce this.
Update
You should first get the built changeset info in Jenkins side.
There seems to be a build.changeSets variable which could retrieve all the changeset.
Then you could directly use rest api in TFS to query work items info from changeset ID. Detail steps kindly take a look at here: How to retrieve work items associated to a build in jenkins with pipeline?
According to your description, seems you just want to get all work items between releases (for example: the current release and a previous release).
Retrieve work items by calling
https://{account}.vsrm.visualstudio.com/[teamproject]/_apis/Release/releases/{current release id}/workitems?api-version=4.1-preview.1&baseReleaseId={release id}
It just return the id, url of work items, and then you need to get details of work item through Get a list of work items REST API.
I am new to Azure DevOps, so perhaps this is a really simple question. When selecting a build (there are many) to deploy to production, it would be great if I could identify the user stories or tasks were included in that build. I want to be able to say what work is being deployed before it is live, or tell customers who are waiting for new features when that feature is live.
I have tried to write a script using the Azure DevOps API and can see my builds and pull requests. But how do I link them? Is there an existing tool to do this maybe? It would also be great to say given a user story id (e.g. 171171), you could say which build it appears in. Is this possible or do this without saving all of the data from the API and reading this cached version?
You can specify work items (Bugs, User Storys, ...) when commiting to the Git-Repo. This is done by Hashtag and the work item number (e.g. #1234). Visual Studio also has a UI support for this, which does the same.
The linked work items will automatically be display at the Build summery page.
Just add work items into commit. Here is different options: Linking Work Items to Git Branches, Commits, and Pull Requests
I need to know which projects are part of a changeset for a specifc build using the VSTS API 2018. The REST api doesn´t seem to support getting a changeset based on a buildId. https://learn.microsoft.com/en-us/rest/api/vsts/tfvc/changesets/get
Is it possible to get a changeset based on a build ID?
Yes. You're looking at the wrong area of the documentation.
Ref: https://learn.microsoft.com/en-us/rest/api/vsts/build/builds/get%20build%20changes
GET
https://{accountName}.visualstudio.com/{project}/_apis/build/builds/{buildId}/changes?api-version=4.1
That gets you the changes associated with a build. If you want to get more details on the changesets from there, you can retrieve the specific changesets using the API you've already discovered.
The TFS Rest API allows me to get a specific Release for a Team Project
Ex. https://bla.visualstudio.com/MySuperProject/_apis/release/releases/666
I already found, how to get the related Pool of the Release. But is it possible to retrieve the Agent where the Release was deployed using the TFS Rest API ?
Thanks
You can get the release with all the details by calling REST API as shown below. You should use youraccount.vsrm.visualstudio
https://yourVSTSAccount.vsrm.visualstudio.com/yourproject/_apis/release/releases/releaseid
example
https://myac.vsrm.visualstudio.com/Project%20X/_apis/release/releases/106
gives the release agent in deployment steps as shown below
We use visualstudio.com hosted TFS service.
I need to add a QA / tester to our TFS account, but I do not want them to have any access to our code. Simply just access to the GUI to report bugs, nothing more.
Any tips? Right now I believe when I add the user to the project, they can access our code.
You can secure the "Code" separately from the Work Items by going to the "Code" tab and selecting the dropdown next to the project name and selecting Security.