Beispiel #1
0
        private void CreateIdealBurndown()
        {
            //generate ideal burndown
            ProjectedTotal.Updates.Clear();
            var remainingTotal = totalEstimatedHours;
            var currrentDay    = DateTime.Today;

            if (tasks.First().Updates.Any())
            {
                currrentDay = tasks.First().Updates.First().Date;
            }

            while (true)
            {
                remainingTotal -= hoursPerDay;
                var update = new TaskTotalUpdateViewModel
                {
                    Hours = remainingTotal,
                    Date  = currrentDay
                };
                ProjectedTotal.Updates.Add(update);
                currrentDay = AddDays(currrentDay, 1);
                if (update.Hours <= 0)
                {
                    return;
                }
            }
        }
Beispiel #2
0
        private void CreateAverageExtrapolation()
        {
            if (!tasks.First().Updates.Any())
            {
                return;
            }

            AnalysisAverageExtrapolation.Updates.Clear();
            var currrentDay    = tasks.First().Updates.Last().Date;
            var remainingTotal = RemainingHours.Updates.Last().Hours;

            var avg = TotalWorked.Updates.Average(u => u.Hours);

            if (avg <= 0)
            {
                return;
            }

            while (true)
            {
                var update = new TaskTotalUpdateViewModel
                {
                    Hours = remainingTotal,
                    Date  = currrentDay
                };
                AnalysisAverageExtrapolation.Updates.Add(update);

                currrentDay     = AddDays(currrentDay, 1);
                remainingTotal -= avg;

                if (update.Hours <= 0)
                {
                    return;
                }
            }
        }