Ejemplo n.º 1
0
        public TeamSettingsIteration AddIterationToTeam(string TeamProjectName, string TeamName, WorkItemClassificationNode Iteration)
        {
            TeamContext tmcntx = new TeamContext(TeamProjectName, TeamName);

            TeamSettingsIteration teamSettingsIteration = new TeamSettingsIteration();

            teamSettingsIteration.Id    = Iteration.Identifier;
            teamSettingsIteration.Name  = Iteration.Name;
            teamSettingsIteration.Links = Iteration.Links;

            return(WorkClient.PostTeamIterationAsync(teamSettingsIteration, tmcntx).Result);
        }
Ejemplo n.º 2
0
        public TeamSettingsIteration GetDefaultTeamCurrentIteration(string pProjectName)
        {
            var project = ProjectClient.GetProject(pProjectName).Result;

            TeamContext _tmcntx = new TeamContext(project.Id, project.DefaultTeam.Id);

            var _iterations = WorkClient.GetTeamIterationsAsync(_tmcntx).Result;

            foreach (var _iteration in _iterations)
            {
                if (DateTime.Now.Date >= _iteration.Attributes.StartDate && DateTime.Now.Date <= _iteration.Attributes.FinishDate)
                {
                    return(_iteration);
                }
            }

            return(null);
        }