|
Hi,
I am new to TFS & so I am sorry if I am asking a very obvious question...
I am trying to programaticaly check in a file. The check in policy that's been established is such that every check in is to be associated with a workitem. I am not sure how to do this in my code
I guess I need to have a WorkItemType object which will be a parameter to the WorkItem object , which I can again use in the WorkItemCheckinInfo.
The problem is I dont know how to create a WorkItemType object. I will have a workitem already created in VSTS & I just need to associate my check in with that workitem ID
WorkItemCheckinInfo [] workItemInfo = new WorkItemCheckinInfo[1];
WorkItemType type = new WorkItemType(); //?? I dont know how to do this...There is no constructor.so how do i get a type
WorkItem pub_subWorkItem = new WorkItem(type);
workItemInfo[0] = new WorkItemCheckinInfo(pub_subWorkItem, WorkItemCheckinAction.Associate);
I will use the 'workItemInfo' in when i call the CheckIn() method as follows:
destworkspace.CheckIn(destpendingchanges, "Checked in at: "+ DateTime.Now.ToString (),null,workItemInfo,null);
Can somone pls help me out?
Much Thanks in advance,
~ramya |