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)
|