View Single Post
  #4  
Old 07-07-2014, 06:36 AM
Philip Beck Philip Beck is online now
Registered User
 
Join Date: 06-19-2014
Posts: 2
I finally managed to do the association during checkin using a powershell script and reflection on the TFS object model.

Google Get-TfsCollection and then my final few lines looked like this:


$col = Get-TfsCollection("http://xxxxxxxxxxxx:8080/tfs/DefaultCollection")

$wis = Get-TfsWorkItemStore($col)

$vcs = Get-TfsVersionControlServer($col)

$wi = $wis.GetWorkItem(1234)

$ws = $vcs.GetWorkspace("C:\xxxxxxxx")

$pc = $ws.GetPendingChanges()

$wici = Get-TfsWorkItemCheckinInfo($wi)

$changeset = $ws.CheckIn($pc, "xxxxx", $null, $wici, $null)
Reply With Quote