Exemple #1
0
        private void AnalyzeProgressForStory()
        {
            foreach (var story in CurrentSprint.GetUnCompletedStories())
            {
                StoryProgressItem progressItem = GetStoryProgress(story);
                ProgressOfStories.Add(progressItem);
            }

            ProgressOfStories.Sort(new StoryProgressItemComparer());
        }
Exemple #2
0
        private void AnalyzeStoryTaskWithException()
        {
            foreach (var story in CurrentSprint.GetUnCompletedStories())
            {
                var     errorDesc = string.Empty;
                var     errorType = string.Empty;
                var     errorImg  = string.Empty;
                decimal diffDesc  = 0;

                if (IsSizeMismatch(story, ref errorType, ref errorDesc, ref errorImg, ref diffDesc))
                {
                    var exItem = new ExceptionItem()
                    {
                        Owner             = NameUtil.ConvertToEngName(story.Owner),
                        Item              = story.Type + " " + story.ID + " " + story.Title,
                        ExceptionCategory = errorType,
                        ExceptionImg      = errorImg,
                        ExceptionDetail   = errorDesc,
                        Diff              = diffDesc
                    };
                    StoriesInException.Add(exItem);
                }

                foreach (var task in story.GetInCompleteTasks())
                {
                    if (NameUtil.ConvertToEngName(task.Owner) == NameUtil.NoOwner)
                    {
                        var exItem = new ExceptionItem()
                        {
                            Owner             = NameUtil.ConvertToEngName(task.Owner),
                            Item              = "Task " + task.ID + " " + task.Description,
                            ExceptionCategory = "No Owner",
                            ExceptionImg      = "No Owner",
                            ExceptionDetail   = "This task has no owner. It belongs to " + story.Type + " " + story.GetBreifDesc()
                        };
                        TasksInException.Add(exItem);
                    }
                    else if (task.Estimate == 0)
                    {
                        var exItem = new ExceptionItem()
                        {
                            Owner             = NameUtil.ConvertToEngName(task.Owner),
                            Item              = "Task " + task.ID + " " + task.Description,
                            ExceptionCategory = "This task's estimation is 0",
                            ExceptionImg      = "Zero",
                            ExceptionDetail   = "This task's estimation is 0. It belongs to " + story.Type + " " + story.GetBreifDesc()
                        };
                        TasksInException.Add(exItem);
                    }
                }

                //Michael Task or Story size is 0/
            }
        }
Exemple #3
0
 private void AnalyzeHighRiskForStory()
 {
     foreach (var story in CurrentSprint.GetUnCompletedStories())
     {
         var errorDesc = string.Empty;
         var errorType = string.Empty;
         if (IsHighRisk(story, ref errorDesc))
         {
             HighRiskStories.Add(story, errorDesc);
         }
     }
 }
Exemple #4
0
        private void AnalyzeHighRiskForPersonByStory()
        {
            Dictionary <string, List <Story> >   personToStories  = new Dictionary <string, List <Story> >();
            Dictionary <string, List <decimal> > personToWorkToDo = new Dictionary <string, List <decimal> >();

            foreach (var story in CurrentSprint.GetUnCompletedStories())
            {
                string ownerEngName = NameUtil.ConvertToEngName(story.Owner);

                if (!personToWorkToDo.ContainsKey(ownerEngName))
                {
                    personToWorkToDo[ownerEngName] = new List <decimal>();
                    personToStories[ownerEngName]  = new List <Story>();
                }

                personToWorkToDo[ownerEngName].Add(GetTotalStoryWorkToDo(story));
                personToStories[ownerEngName].Add(story);
            }

            int availableDays = DateTimeUtil.GetWorkingDays(DateTime.Now, CurrentSprint.EndTime);

            foreach (var item in personToWorkToDo)
            {
                decimal totalWorkToDoInDays = 0;
                item.Value.ForEach(t => totalWorkToDoInDays += t);

                if (totalWorkToDoInDays > availableDays)
                {
                    string errorDesc       = $"This member has a total of {item.Value.Count} story/stories.They still need {totalWorkToDoInDays} day(s), but there are only {availableDays} day(s) left in the sprint.";
                    var    ownerStories    = personToStories[item.Key].Select(t => t.Type + " " + t.ID + " " + t.Title + "- Size:" + t.Size);
                    var    persionRiskItem = new PersonRiskItem()
                    {
                        Owner = item.Key, ExceedDay = totalWorkToDoInDays - availableDays, OwningStories = string.Join("\n", ownerStories), RiskDetail = errorDesc
                    };
                    HighRiskPersons.Add(persionRiskItem);
                }
            }
        }