public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            if (string.Compare(workitem.Type, Constants.ProductBacklogItem, true) == 0)
            {
                //get atleast one "IMPACT ANALYSIS" task assigned to anyone
                const string AnalysisTaskTitle = "IMPACT ANALYSIS";
                var          analysisTasks     = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(AnalysisTaskTitle) >= 0).ToList();
                if (analysisTasks.Count > 0)
                {
                    analysisTasks.ForEach(p => p.Owner = TaskOwnerType.Team);
                }
                else
                {
                    workitem.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = "Impact Analysis task not created yet",
                        AssignedTo = workitem.AssignedTo
                    });
                }

                //get atleast one "touch points" task assigned to anyone (optional)
                const string TouchPointTaskTitle = "TOUCH POINT";
                var          touchPointTasks     = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(TouchPointTaskTitle) >= 0).ToList();
                if (touchPointTasks.Count > 0)
                {
                    touchPointTasks.ForEach(p => p.Owner = TaskOwnerType.Team);
                }
            }
        }
Пример #2
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     ValidateByrole(context, workitem, TaskOwnerType.Architect, "Architect code review");
     ValidateByrole(context, workitem, TaskOwnerType.Peer, "Peer code review");
     ValidateByrole(context, workitem, TaskOwnerType.Developer, "Development");
     ValidateByrole(context, workitem, TaskOwnerType.Tester, "Testing");
     ValidateByrole(context, workitem, TaskOwnerType.Team, "Generic");
 }
Пример #3
0
 //check if current assigned person is developer
 private static string GetAssignedToIfDeveloper(EvaluationServiceContext context, string assignedTo)
 {
     if (context.TeamProfiles != null && context.TeamProfiles.Count > 0)
     {
         if (context.TeamProfiles.Where(p => string.Compare(p.Fullname, assignedTo, true) == 0 && string.Compare(p.Role, TaskOwnerType.Developer.ToString(), true) == 0).Any())
         {
             return(assignedTo);
         }
     }
     return(string.Empty);
 }
Пример #4
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (workitem.Tasks.Where(q => string.IsNullOrEmpty(q.AssignedTo) == true).Any())
     {
         workitem.Observations.Add(new Observation
         {
             Code       = "Lifecycle checklist",
             Title      = "There are one or more unassigned tasks created for this workitem.",
             AssignedTo = workitem.AssignedTo   //TODO: Logic to identify assignedTo
         });
     }
 }
Пример #5
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (workitem.Tasks == null || workitem.Tasks.Count == 0)
     {
         workitem.Observations.Add(new Observation
         {
             Code       = "Lifecycle checklist",
             Title      = "Tasks not created under this PBI",
             AssignedTo = workitem.AssignedTo
         });
     }
 }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            var query = workitem.Tasks.Where(p => p.IterationPath != workitem.IterationPath);

            if (workitem.Tasks == null || query.Any())
            {
                Rolewise(workitem, query, TaskOwnerType.Architect, "architect code review");
                Rolewise(workitem, query, TaskOwnerType.Peer, "peer code review");
                Rolewise(workitem, query, TaskOwnerType.Developer, "development");
                Rolewise(workitem, query, TaskOwnerType.Tester, "testing");
                Rolewise(workitem, query, TaskOwnerType.Team, "generic");
            }
        }
Пример #7
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (workitem.Effort == 0)
     {
         //get first developer
         var assignedToDev = workitem.Tasks.Where(p => p.Owner == TaskOwnerType.Developer).FirstOrDefault();
         workitem.Observations.Add(new Observation
         {
             Code       = "Lifecycle checklist",
             Title      = "Estimates are missing.",
             AssignedTo = assignedToDev != null ? assignedToDev.AssignedTo : string.Empty
         });
     }
 }
Пример #8
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (string.Compare(workitem.Type, Constants.ProductBacklogItem, true) == 0)
     {
         if (string.Compare(workitem.State, "Committed", true) != 0 && string.Compare(workitem.State, "Done", true) != 0)
         {
             workitem.Observations.Add(new Observation
             {
                 Code       = "Lifecycle checklist",
                 Title      = "The PBI is not marked Committed or Done.",
                 AssignedTo = workitem.AssignedTo
             });
         }
     }
 }
Пример #9
0
        private void ValidateByrole(EvaluationServiceContext context, TimeLog workitem, TaskOwnerType taskowner, string taskTypes)
        {
            var teamMembers = context.TeamProfiles.Where(p => string.Compare(p.Role, taskowner.ToString(), true) == 0).Select(p => p.Fullname.ToLower()).ToList();

            workitem.Tasks.Where(p => p.Owner == taskowner).ToList().ForEach(p =>
            {
                if (teamMembers.Where(q => teamMembers.Contains(q.ToLower()) == false).Any())
                {
                    workitem.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("One or more {0} tasks are not assigned to respective {1}s", taskTypes, taskowner),
                        AssignedTo = workitem.AssignedTo
                    });
                }
            });
        }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            const string PeerCodeReviewTaskTitle = "PEER CODE REVIEW";
            //get atleast one "PEER CODE REVIEW" task assigned to anyone
            var peerCodeReviewTasks = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(PeerCodeReviewTaskTitle) >= 0).ToList();

            if (peerCodeReviewTasks.Count > 0)
            {
                peerCodeReviewTasks.ForEach(p => p.Owner = TaskOwnerType.Peer);
            }
            else
            {
                workitem.Observations.Add(new Observation
                {
                    Code       = "Lifecycle checklist",
                    Title      = "Peer code review task not created yet. Please contact respective peer.",
                    AssignedTo = workitem.AssignedTo   //TODO: Logic to identify peer reviewer
                });
            }
        }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            const string FunctionalTestingTaskTitle = "FUNCTIONAL TESTING";
            //get atleast one "FUNCTIONAL TESTING" task assigned to anyone
            var testingTasks = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(FunctionalTestingTaskTitle) >= 0).ToList();

            if (testingTasks.Count > 0)
            {
                testingTasks.ForEach(p => p.Owner = TaskOwnerType.Tester);
            }
            else
            {
                workitem.Observations.Add(new Observation
                {
                    Code       = "Lifecycle checklist",
                    Title      = "Functional testing task not created yet. Please contact respective QA",
                    AssignedTo = GetAssignedToIfTester(context, workitem.AssignedTo)
                });
            }
        }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            var taskDoneButNoTimeQuery = workitem.Tasks.Where(q => q.IsTaskMarkedAsDone == true && q.Effort == 0 && q.Owner != TaskOwnerType.Team);

            if (taskDoneButNoTimeQuery.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Mismatch",
                    Title = "There is atleast one task marked completed, but no time logged under it."
                });
                taskDoneButNoTimeQuery.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Mismatch",
                        Title      = string.Format("Task #{0} is marked completed but has no time logged under it.", p.WorkitemId),
                        AssignedTo = p.AssignedTo
                    });
                });
            }

            var incompleteTaskNoRemainingTimeQuery = workitem.Tasks.Where(q => q.RemainingWork == null && q.IsTaskMarkedAsDone == false);

            if (incompleteTaskNoRemainingTimeQuery.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Lifecycle checklist",
                    Title = "Atleast one of the incomplete task is missing remaining work"
                });
                incompleteTaskNoRemainingTimeQuery.ToList().ForEach(p => {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("Task #{0} is incomplete but does not have remaining work", p.WorkitemId),
                        AssignedTo = p.AssignedTo
                    });
                });
            }
        }
Пример #13
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (string.Compare(workitem.Type, Constants.ProductBacklogItem, true) == 0)
     {
         const string TestcaseWritingTaskTitle = "TC WRITING";
         var          testingTasks             = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(TestcaseWritingTaskTitle) >= 0).ToList();
         if (testingTasks.Count > 0)
         {
             testingTasks.ForEach(p => p.Owner = TaskOwnerType.Tester);
         }
         else
         {
             workitem.Observations.Add(new Observation
             {
                 Code       = "Lifecycle checklist",
                 Title      = "TC Writing task not created yet. Please contact respective QA",
                 AssignedTo = workitem.AssignedTo   //TODO: Logic to identify tester
             });
         }
     }
 }
Пример #14
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (string.Compare(workitem.Type, Constants.Bug, true) == 0)
     {
         const string CodingTaskTitle = "CODING";
         var          unitTestTasks   = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(CodingTaskTitle) >= 0).ToList();
         if (unitTestTasks.Count > 0)
         {
             unitTestTasks.ForEach(p => p.Owner = TaskOwnerType.Developer);
         }
         else
         {
             workitem.Observations.Add(new Observation
             {
                 Code       = "Lifecycle checklist",
                 Title      = "Coding task not created yet.",
                 AssignedTo = GetAssignedToIfDeveloper(context, workitem.AssignedTo)
             });
         }
     }
 }
Пример #15
0
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (string.Compare(workitem.Type, Constants.ProductBacklogItem, true) == 0)
     {
         const string ArchitectReviewTaskTitle = "ARCHITECT CODE REVIEW";
         //get atleast one "ARCHITECT CODE REVIEW" task assigned to anyone
         var architectCodeReviewTasks = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(ArchitectReviewTaskTitle) >= 0).ToList();
         if (architectCodeReviewTasks.Count > 0)
         {
             architectCodeReviewTasks.ForEach(p => p.Owner = TaskOwnerType.Architect);
         }
         else
         {
             workitem.Observations.Add(new Observation
             {
                 Code       = "Lifecycle checklist",
                 Title      = "Architect code review task not created yet. Please contact respective architect/Lead",
                 AssignedTo = workitem.AssignedTo   //TODO: Logic to identify architect
             });
         }
     }
 }
 public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
 {
     if (string.Compare(workitem.Type, Constants.ProductBacklogItem, true) == 0)
     {
         const string UnitTestingTaskTitle = "UNIT TESTING";
         //get atleast one "UNIT TESTING" task assigned to ME
         var unitTestTasks = workitem.Tasks.Where(q => q.Title.ToUpper().IndexOf(UnitTestingTaskTitle) >= 0).ToList();
         if (unitTestTasks.Count > 0)
         {
             unitTestTasks.ForEach(p => p.Owner = TaskOwnerType.Developer);
         }
         else
         {
             workitem.Observations.Add(new Observation
             {
                 Code       = "Lifecycle checklist",
                 Title      = "Unit testing task not created yet.",
                 AssignedTo = workitem.AssignedTo
             });
         }
     }
 }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            var query = workitem.Tasks.Where(q => q.Title.StartsWith(workitem.WorkitemId.ToString()) == false);

            if (query.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Naming convention",
                    Title = "At least one task title does not start with PBI number.",
                });

                query.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Naming convention",
                        Title      = string.Format("Title of task #{0} does not start with PBI number.", p.WorkitemId),
                        AssignedTo = p.AssignedTo
                    });
                });
            }
        }
Пример #18
0
        public override List <TimeLog> LoadData(EvaluationServiceContext context)
        {
            var organization = new Organization {
                Id = 1, Title = "Organization 1"
            };
            var project = new Project {
                Id = 1, Title = "Project 1", Organization = organization
            };

            var tasks = new List <TimeLog>();

            tasks.Add(new TimeLog
            {
                Title = "Task title 1"
            });

            var workitems = new List <TimeLog>();

            workitems.Add(new TimeLog
            {
                Id                 = 1,
                Title              = "product backlog item #1",
                Activity           = "Development",
                Effort             = 10,
                IsTaskMarkedAsDone = true,
                Owner              = TaskOwnerType.Developer,
                AssignedTo         = "Abhijeet Dhamankar",
                IterationPath      = "Release 1",
                Project            = project,
                State              = "New",
                TrackingDate       = DateTime.Now,
                Type               = "Coding",
                Tasks              = tasks
            });
            return(workitems);
        }
        public override void Analyze(EvaluationServiceContext context, TimeLog workitem)
        {
            //development tasks
            var query = workitem.Tasks.Where(p => p.Owner == TaskOwnerType.Developer && string.Compare(p.Activity, "Development", true) != 0);

            if (query.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Lifecycle checklist",
                    Title = "One or more developer tasks do not have the right \"Activity\" (Development)."
                });

                query.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("Developer task #{0} does not have the right \"Activity\" (Development).", p.WorkitemId),
                        AssignedTo = p.AssignedTo,
                        WorkitemId = p.WorkitemId
                    });
                });
            }

            //QA tasks
            query = workitem.Tasks.Where(p => p.Owner == TaskOwnerType.Tester && string.Compare(p.Activity, "Testing", true) != 0);
            if (query.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Lifecycle checklist",
                    Title = "One or more tester tasks do not have the right \"Activity\" (Testing)."
                });

                query.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("Testing task #{0} does not have the right \"Activity\" (Testing).", p.WorkitemId),
                        AssignedTo = p.AssignedTo,
                        WorkitemId = p.WorkitemId
                    });
                });
            }

            //peer review task
            query = workitem.Tasks.Where(p => (p.Owner == TaskOwnerType.Peer) && string.Compare(p.Activity, "Design", true) != 0);
            if (query.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Lifecycle checklist",
                    Title = "Peer review task does not have the right \"Activity\" (Design)."
                });
                query.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("Peer review task #{0} does not have the right \"Activity\" (Design).", p.WorkitemId),
                        AssignedTo = p.AssignedTo,
                        WorkitemId = p.WorkitemId
                    });
                });
            }

            //architect review task
            query = workitem.Tasks.Where(p => (p.Owner == TaskOwnerType.Architect) && string.Compare(p.Activity, "Design", true) != 0);
            if (query.Any())
            {
                workitem.Observations.Add(new Observation
                {
                    Code  = "Lifecycle checklist",
                    Title = "Architect review task does not have the right \"Activity\" (Design)."
                });
                query.ToList().ForEach(p =>
                {
                    p.Observations.Add(new Observation
                    {
                        Code       = "Lifecycle checklist",
                        Title      = string.Format("Architect review task #{0} does not have the right \"Activity\" (Design).", p.WorkitemId),
                        AssignedTo = p.AssignedTo,
                        WorkitemId = p.WorkitemId
                    });
                });
            }
        }