tfs2013 - Reparent branch use TFS Api -


i use tfs 2013 , possible change parent of branch ,use tfs api , programmatically

can reparent process on tfs api

if workitem talking about, sure can! parent link , remove old link , add new parent workitem link.

remove parent link:

workitemlinktypeend linktypend = workitemstore.workitemlinktypes.linktypeends["parent"]; foreach (workitemlink link in wi.workitemlinks) {  if (link.linktypeend.name == linktypend.name && link.targetid == wiid)     {       wi.links.remove(link);       wi.save();      }  } 

then add new parent link: should pretty straightforward. had issues looking parent linktypeend. tried using system.linktypes.hierarchy workitem link type.

workitemlinktype linktype = workitemstore.workitemlinktypes["system.linktypes.hierarchy"]; workitemlinktypeend linktypeend = workitemstore.workitemlinktypes.linktypeends[linktype.reverseend.name];  wi.links.add(new relatedlink(linktypeend, wiid));  wi.save(); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -