how to link work items using C#
-
Wednesday, September 29, 2010 1:18 PMI need code in C# or ADO.net to create link between work items in TFS 2010
Please have a look at this block first to get an idea...
http://blogs.microsoft.co.il/blogs/shair/archive/2010/02/27/tfs-api-part-22-create-link-between-work-item-parent-child-etc.aspx
Same as above I need code for create link between work items.
1. I have FPS work items separately in TFS (Without linking to BUC)
2. I have BUC work items separately in TFS (Without linking to FPS).
3. I am also going to create two tables in SQL , one for FPS and another one for BUC
4. FPS table fileds are - ID, Title
5. BUC table fields are - ID, title and Comments
6. FPS and BUC table can have more than 20000 records !!!
7. Then I can write code as follows using C#
Open TFS server
Open and Read SQL tables FPS, BUC
Read first record in FPS , BUC table
Until end of SQL _FPS, BUC table
{
Int A = Find work item in TFS
Where work item. Identifier =SQL_table_FPS.ID;
Int B= Find work item in TFS
Where work item. Identifier= SQL_table_BUC.ID
Create link between A and B ; link type= satisfies ; Link comments= SQL_Table_BUC.comments;
Read next record on SQl_table_ FPS, BUC
}
Save all in TFS
End
Can anybody helpout on this?
All Replies
-
Wednesday, September 29, 2010 1:24 PM
I need code in C# or ADO.net to create link between work items in TFS 2010
Please have a look at this block first to get an idea...
http://blogs.microsoft.co.il/blogs/shair/archive/2010/02/27/tfs-api-part-22-create-link-between-work-item-parent-child-etc.aspx
Same as above I need code for create link between work items.
1. I have FPS work items separately in TFS (Without linking to BUC)
2. I have BUC work items separately in TFS (Without linking to FPS).
3. I am also going to create two tables in SQL , one for FPS and another one for BUC
4. FPS table fileds are - ID, Title
5. BUC table fields are - ID, title and Comments
6. FPS and BUC table can have more than 20000 records !!!
7. Then I can write code as follows using C#
Open TFS server
Open and Read SQL tables FPS, BUC
Read first record in FPS , BUC table
Until end of SQL _FPS, BUC table
{
Int A = Find work item in TFS
Where work item. Identifier =SQL_table_FPS.ID;
Int B= Find work item in TFS
Where work item. Identifier= SQL_table_BUC.ID
Create link between A and B ; link type= satisfies ; Link comments= SQL_Table_BUC.comments;
Read next record on SQl_table_ FPS, BUC
}
Save all in TFS
End
Can anybody helpout on this?- Merged by Mike Dos ZhangMicrosoft Contingent Staff Friday, October 01, 2010 7:09 AM duplicate
-
Thursday, September 30, 2010 3:34 AMhttp://www.ewaldhofman.nl/post/2009/11/03/TFS-2008-API-Create-a-link-between-work-items.aspx
Ewald - Please remember to mark the replies as answers if they help.

Blog: www.ewaldhofman.nl -
Thursday, September 30, 2010 5:24 AM
hi~~
i left reply to the same question that you left below.
is it right?
- Proposed As Answer by Cathy KongMicrosoft Contingent Staff, Moderator Wednesday, October 06, 2010 3:30 AM

