Ejemplo n.º 1
0
        public void GetDataFromDevOps()
        {
            var reader = new DevOpsReader(AzureUrl);

            Activities = reader.GetActivities(_params.Employees, _params.Start, _params.End);

            FillCustomFields();
        }
Ejemplo n.º 2
0
        private void CreateTaskEstimateReport()
        {
            var taskIds = _taskEstimates.Where(x => x.TaskId != null).Select(x => (int)x.TaskId).ToList();

            var reader = new DevOpsReader(AzureUrl);

            var tasks = reader.GetTasks(taskIds);

            TaskEstimateReport = new List <RITaskEstimate>();

            foreach (var taskEstimate in _taskEstimates)
            {
                var item = new RITaskEstimate();

                item.SpecName  = taskEstimate.SpecName;
                item.Analytic  = taskEstimate.Analytic;
                item.Date      = taskEstimate.Date;
                item.Developer = taskEstimate.Developer;
                item.Reviewer  = taskEstimate.Reviewer;
                item.EstimateDeveloperHours = taskEstimate.EstimateDeveloperHours;
                item.EstimateReviewerHours  = taskEstimate.EstimateReviewerHours;

                item.TaskId = taskEstimate.TaskId;

                var task = tasks.FirstOrDefault(x => x.Id == item.TaskId);

                if (task != null)
                {
                    item.TaskName          = task.Name;
                    item.Start             = task.StartDate;
                    item.End               = task.FinishDate;
                    item.EstimateFactHours = task.CompletedWork;
                    item.State             = task.State;
                }

                TaskEstimateReport.Add(item);
            }

            TaskEstimateReport = TaskEstimateReport.OrderBy(x => x.Date).ToList();
        }