4

We have a rule in TFS that requires all checkins to be associated with a work item. We have an automated daily build process that uses tf.exe to check in the files. However, I did not find any way to associate files with a work item. I heard of tfpt, and have it installed, however, I did not have any success using it to associate files with a changeset either. Is there another way to do this?

Thanks!

laconicdev
  • 6,360
  • 11
  • 63
  • 89

2 Answers2

3

I'm pretty sure tf.exe / tfpt.exe cannot do this except through their UI. If you need to use the -noprompt parameter for automation then you're likely out of luck.

Luckily, it's not hard to use the API directly. MSDN link. Basically just build up an array of WorkItemCheckinInfo[] and pass it along with your request.

Richard Berg
  • 20,629
  • 2
  • 66
  • 86
-1

Team Foundation Power Tools has a command for dealing with work items.

tfpt.exe help workitem
John Fisher
  • 22,355
  • 2
  • 39
  • 64