문제

I've used the tfs api to programatically add links between work items in different team-projects, currently all links are set as related links but I'd like to change some of them to some of the other types supported in tfs2010 e.g. "parent" etc. but I can't work out how to do it. Any ideas? thanks

edit:

originally I added thus:

RelatedLink link = new RelatedLink(iLinkMe); 
wi.Links.Add(link); 

when I think I should have added:

WorkItemLinkTypeEnd linkTypEnd = store.WorkItemLinkTypes.LinkTypeEnds["Parent"];
RelatedLink linkBetter = new RelatedLink(linkTypEnd, iLinkMe); 
wi.Links.Add(linkBetter );

but I didn't, (and I don't like the "Parent" string, I was looking for an enum), so how do I change the linkTypeEnd? I'm guessing I can modify this via wi.Links ?

도움이 되었습니까?

해결책

Have a look at this site on how to Create Link Between Work Item (Parent, Child etc…).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top