So far I can programmatically create a new Team and a new Area, but when I navigate to the TFS 2015 "Work" tab I see this error:
TF400509: No backlog iteration path was specified. You must select an iteration path.
So if I manually choose one iteration then I get:
TF400512: You have not selected any areas for your team. You must select at least one area before you can use features such as the product backlog, the task board or tiles.
Here's my code:
tpc.Authenticate();
// Create New Area
ICommonStructureService css = tpc.GetService<ICommonStructureService>();
string rootNodePath = string.Format("\\Onboarding\\Area");
var pathRoot = css.GetNodeFromPath(rootNodePath);
var newAreaPath = css.CreateNode("Area 51", pathRoot.Uri);
// Create new Team with Same Name
TfsTeamService tts = tpc.GetService<TfsTeamService>();
string newteamname = "Area 51";
string teamdescription = "Area 51 Team Description";
IDictionary<string, object> prop = new Dictionary<string, object>
{
{"Area", "Area 51"},
{"Iteration", "\\Onboarding\\Iteration\\Onboarding" }
};
tts.CreateTeam(onboardingProject.Uri.ToString(), newteamname, teamdescription, prop);
TfsTeamService teamService = tpc.GetService<TfsTeamService>();
ProjectInfo projectInfo = css.GetProjectFromName("Onboarding");
var allTeams = teamService.QueryTeams(projectInfo.Uri);
So the question again?
At what point can you set the Backlog Iteration for the new Area, and how/where do you select the new Area for the new Team?