Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Associating existing unassociated changesets with workitem in TFS

I know there're powerful TFS command line tools from TFS Power tools that provide much more that can be achieved through Visual Studio integrated capabilities.

I have several changesets that aren't associated with any workitem. I would like to create a new workitem and associate these existing changesets with it.

Is this possible? I don't see any particular reason why not, but it depends whether command line tools provide such functionality.

like image 566
Robert Koritnik Avatar asked Feb 14 '13 10:02

Robert Koritnik


People also ask

How do I link changes to Workitem?

Associating a Work Item to a Changeset After Checking InOn the Links tab of the work item select Add. By default, this shows the Link Type is set to Work Item. However, you can change the type to Changeset and then browse for the change set(s) you wish to associate with the code.

How do I apply Changesets in TFS?

In Source Control Explorer, hit keyboard key Ctrl + G. The Go to Changeset dialog box appears. Type the number of the changeset and choose OK.

How do I create a changeset in Azure Devops?

If you use TFVC version control, you could invoke REST API Changesets - Create in a powershell task or TF Command Checkin command in a command line task in your Pipeline to create a new changeset. If you Git version control, you could invoke REST API Pushes - Create to push changes to the repository.


2 Answers

Sure you can associate a work item to an existing changeset. You can do that directly in the Visual Studio IDE. Here's how:

First open the work item - and select the All Links tab:

Work item details

Then click on Link to and select the changeset and click Ok:

Select changeset here

like image 138
Morten Frederiksen Avatar answered Oct 10 '22 09:10

Morten Frederiksen


Yes, read bellow.

This can be achieved from workitems links section, in your definition i don't see reason why you would want to use something else. If you are interested in some bulk solution, then Tfs has full-fledged API any tool will likely using it as well.

Following covers your case in api: http://social.technet.microsoft.com/wiki/contents/articles/3280.tfs-2010-api-create-workitems-bugs.aspx TFS2010: How to link a WorkItem to a ChangeSet, you can use VersionControlServer.QueryHistory method to get changesets you need

For powershell this covers item creation: http://programmaticponderings.wordpress.com/2012/07/18/automating-work-item-creation-in-tfs-2010-with-powershell-continued/

like image 45
drk Avatar answered Oct 10 '22 10:10

drk