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

            ProgressOfStories.Sort(new StoryProgressItemComparer());
        }
Example #2
0
        private StoryProgressItem GetStoryProgress(Story story)
        {
            var progressItem = new StoryProgressItem();

            progressItem.StoryType = story.Type.ToString();
            progressItem.StoryDesc = story.GetDesc();
            progressItem.Owner     = NameUtil.ConvertToEngName(story.Owner);
            decimal totalWorkDone = GetTotalStoryWorkDoInHours(story);
            decimal totalWorkToDo = GetTotalStoryWorkToDoInHours(story);

            if ((totalWorkToDo + totalWorkDone) == 0)
            {
                progressItem.Progress = 0;
            }
            else
            {
                progressItem.Progress = (int)((totalWorkDone / (totalWorkToDo + totalWorkDone)) * 100);
            }

            return(progressItem);
        }