Ejemplo n.º 1
0
        public static List <BugEntity> GetAddedBugsByIteration(string project, IterationEntity ite)
        {
            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff"); //第一天是大于等于
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");   //最后一天要加一

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var added = GetBugListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "25%20Bug统计分析%2F00本迭代_新增Bug总数"), listquery);

            return(added);
        }
Ejemplo n.º 2
0
        //共享查询%2F迭代总结数据查询%2F10%20工作量统计%2F05本迭代_实际所有的工作日志工作量
        public static List <WorkloadEntity> GetAll(string project, IterationEntity ite)
        {
            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff"); //第一天是大于等于
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");   //最后一天要加一

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.Worklog.WorkDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.Worklog.WorkDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });

            string wiql = API.TFS.Utility.GetQueryClause(String.Format(Utility.QueryBaseDirectory, "10%20工作量统计%2F05本迭代_实际所有的工作日志工作量"));
            string sql  = API.TFS.Utility.ReplaceInformationFromWIQLByReplaceList(wiql, listquery);

            return(GetWorkloadsToEntityBySql(sql));
        }
Ejemplo n.º 3
0
        public static Tuple <double, double, double> GetEstimated(string project, IterationEntity ite)
        {
            List <WorkloadEntity> list = new List <WorkloadEntity>();

            string wiql = API.TFS.Utility.GetQueryClause("共享查询%2F迭代总结数据查询%2F10%20工作量统计%2F00本迭代_任务评估工作量以及实际工作量");
            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.IterationPath] =", replacevalue = ite.Path, notinclude = "", exectOder = "1"
            });
            string sql = API.TFS.Utility.ReplaceInformationFromWIQLByReplaceList(wiql, listquery);

            string responseBody = Utility.ExecuteQueryBySQL(sql);
            var    workloads    = Utility.ConvertWorkitemFlatQueryResult2Array(responseBody);

            double esthour  = 0.0d;
            double acthour  = 0.0d;
            double lefthour = 0.0d;

            foreach (var workload in workloads)
            {
                esthour  += Convert.ToDouble(workload["fields"]["Teld.Scrum.WorkItem.Task.EstimateHours"]);
                acthour  += Convert.ToDouble(workload["fields"]["Teld.Scrum.WorkItem.Task.ActualHours"]);
                lefthour += Convert.ToDouble(workload["fields"]["Microsoft.VSTS.Scheduling.RemainingWork"]);
            }

            Tuple <double, double, double> ret = Tuple.Create <double, double, double>(esthour, acthour, lefthour);

            return(ret);
        }
Ejemplo n.º 4
0
        private static List <BugEntity> GetBugListByIteration(string project, IterationEntity ite, string query, List <WiqlReplaceColumnEntity> listquery)
        {
            string wiql = API.TFS.Utility.GetQueryClause(query);
            string sql  = API.TFS.Utility.ReplaceInformationFromWIQLByReplaceList(wiql, listquery);

            return(GetBugsToEntityBySql(sql));
        }
Ejemplo n.º 5
0
        public static List <List <WorkReviewEntity> > GetAll(string project, IterationEntity ite)
        {
            List <List <WorkReviewEntity> > list = new List <List <WorkReviewEntity> >();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff");
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");

            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.ClosedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.ClosedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var all = GetWorkReviewListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "20%20代码审查分析%2F00本迭代_审查记录单总数"), listquery);

            var bugall = GetWorkReviewListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "20%20代码审查分析%2F01本迭代_审查记录单审查出Bug总数"), listquery);

            list.Add(all);
            list.Add(bugall);

            return(list);
        }
Ejemplo n.º 6
0
        public static int GetStandardWorkingDays(string prjName, IterationEntity ite)
        {
            int standardWorkingDays;
            var daysoff = Iteration.GetProjectIterationDaysOff(prjName, ite.Id);

            standardWorkingDays = (int)((DateTime.Parse(ite.EndDate) - DateTime.Parse(ite.StartDate)).TotalDays) + 1 - daysoff.Count;
            for (DateTime dt = DateTime.Parse(ite.StartDate); dt < DateTime.Parse(ite.EndDate).AddDays(1); dt = dt.AddDays(1))
            {
                bool duplicated = false;
                for (int i = 0; i < daysoff.Count; i++)
                {
                    if (dt.Equals(DateTime.Parse(daysoff[i])))
                    {
                        duplicated = true;
                        break;
                    }
                }
                if (duplicated)
                {
                    continue;            //如果在迭代里面又单独设置了休息日,那么要和取出来的daysoff排除掉。
                }
                if (dt.DayOfWeek == DayOfWeek.Sunday)
                {
                    standardWorkingDays--;                                  //再刨掉礼拜天
                }
            }

            return(standardWorkingDays);
        }
Ejemplo n.º 7
0
        public static List <List <BacklogEntity> > GetAll(string project, IterationEntity ite)
        {
            List <List <BacklogEntity> > list = new List <List <BacklogEntity> >();

            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F05本迭代_已完成积压工作项总数")));
            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F10本迭代_未启动积压工作项总数")));
            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F15本迭代_已中止或已移除积压工作项总数")));
            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F15本迭代_已移除积压工作项总数")));
            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F00本迭代_积压工作项总数")));
            list.Add(GetBacklogListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "05%20Backlog统计分析%2F12本迭代_拖期积压工作项总数")));

            return(list);
        }
Ejemplo n.º 8
0
        public static List <List <BacklogEntity> > GetAll(string project, IterationEntity ite)
        {
            List <List <BacklogEntity> > list = new List <List <BacklogEntity> >();

            list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F05本迭代_已完成积压工作项总数"));
            list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F10本迭代_未启动积压工作项总数"));
            list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F15本迭代_已中止或已移除积压工作项总数"));
            list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F00本迭代_积压工作项总数"));
            list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F12本迭代_拖期积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F30本迭代_已提交测试积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F35本迭代_测试通过积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F40本迭代_应提交测试积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F50本迭代_需编写用例积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F60本迭代_实际编写用例积压工作项总数"));
            //list.Add(GetBacklogListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F05%20Backlog统计分析%2F65本迭代_编写用例总数"));

            return(list);
        }
Ejemplo n.º 9
0
        public static List <CodeReviewEntity> GetAll(string prj, IterationEntity ite)
        {
            string wiql = API.TFS.Utility.GetQueryClause("共享查询%2F迭代总结数据查询%2F20%20代码审查分析%2F00本迭代_代码审查审查的Bug总数");
            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();
            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff");
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = prj, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                           //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                           //最后一天要加一

            string sql = API.TFS.Utility.ReplaceInformationFromWIQLByReplaceList(wiql, listquery);

            return(GetBugsToEntityBySql(sql));
        }
Ejemplo n.º 10
0
        public static List <List <FeatureEntity> > GetAll(string project, IterationEntity ite)
        {
            List <List <FeatureEntity> > list = new List <List <FeatureEntity> >();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff");
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");

            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var all = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F00本迭代_产品特性总数(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.ReleaseFinishedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var completed = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F05本迭代_已完成产品特性总数(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var removed = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F20本迭代_已中止或已移除产品特性总数(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.ReleaseFinishedDate] >=", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var delayed = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F10本迭代_未完成产品特性总数(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var perfect = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F25本迭代_按计划完成产品特性总数(New)", listquery);
            //明细
            var alldetail = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F00本迭代_产品特性总数_明细(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.ReleaseFinishedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var completeddetail = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F05本迭代_已完成产品特性总数_明细(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var removeddetail = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F20本迭代_已中止或已移除产品特性总数_明细(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.ReleaseFinishedDate] >=", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var delayeddetail = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F10本迭代_未完成产品特性总数_明细(New)", listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Scheduling.TargetDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var perfectdetail = GetFeatureListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F01%20产品特性统计分析%2F25本迭代_按计划完成产品特性总数_明细(New)", listquery);

            list.Add(all);
            list.Add(completed);
            list.Add(removed);
            list.Add(delayed);
            list.Add(perfect);

            list.Add(alldetail);
            list.Add(completeddetail);
            list.Add(removeddetail);
            list.Add(delayeddetail);
            list.Add(perfectdetail);

            return(list);
        }
Ejemplo n.º 11
0
        public static List <List <BugEntity> > GetAllByIteration(string project, IterationEntity ite)
        {
            List <List <BugEntity> > list = new List <List <BugEntity> >();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff");
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");

            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();
            var added = GetAddedBugsByIteration(project, ite);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.StateChangeDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.StateChangeDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var _fixed = GetBugListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "25%20Bug统计分析%2F05本迭代_已修复Bug总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.StateChangeDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var notfixed = GetBugListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "25%20Bug统计分析%2F10本迭代_遗留Bug总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var critical = GetBugListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "25%20Bug统计分析%2F25本迭代_新增1或2级Bug总数(程序错误类)"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "[System.TeamProject] = 'OrgPortal'", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.StateChangeDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Microsoft.VSTS.Common.StateChangeDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.BelongTeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            var ignore = GetBugListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "25%20Bug统计分析%2F30本迭代_不予处理或不是错误Bug总数"), listquery);

            //var review = GetBugListByIteration(project, ite, "共享查询%2F迭代总结数据查询%2F25%20Bug统计分析%2F35本迭代_新增评审问题总数",
            //Tuple.Create<string, string, string, string>("[System.TeamProject] =",
            //    "[System.CreatedDate] >=",
            //    "[System.CreatedDate] <",
            //    "_FQQ_"
            //    )
            //);

            list.Add(added);
            list.Add(_fixed);
            list.Add(notfixed);
            list.Add(critical);
            list.Add(ignore);
            //list.Add(review);

            return(list);
        }
Ejemplo n.º 12
0
        private static List <BacklogEntity> GetBacklogListByIteration(string project, IterationEntity ite, string query)
        {
            string wiql = API.TFS.Utility.GetQueryClause(query);
            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.IterationPath] =", replacevalue = ite.Path, notinclude = "", exectOder = "1"
            });
            string sql = API.TFS.Utility.ReplaceInformationFromWIQLByReplaceList(wiql, listquery);

            return(GetBacklogsToEntityBySql(sql));
        }
Ejemplo n.º 13
0
        public static List <List <CommitmentEntity> > GetAll(string project, IterationEntity ite)
        {
            List <List <CommitmentEntity> > list = new List <List <CommitmentEntity> >();

            String start0  = DateTime.Parse(ite.StartDate).AddDays(0).ToString("yyyy-MM-dd HH:mm:ss.fff");
            String endAdd1 = DateTime.Parse(ite.EndDate).AddDays(1).ToString("yyyy-MM-dd HH:mm:ss.fff");

            List <WiqlReplaceColumnEntity> listquery = new List <WiqlReplaceColumnEntity>();

            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.RemovedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                               //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.RemovedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                               //最后一天要加一
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });
            var all = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F00本迭代_提交单总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //最后一天要加一
            var testpassed = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F05本迭代_提交单测试通过总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.RemovedDate] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                               //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.RemovedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                               //最后一天要加一
            var removed = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F10本迭代_已移除提交单总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                           //最后一天要加一
            var needperf = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F15本迭代_需性能测试提交单总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //最后一天要加一
            var perftestpassed = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F20本迭代_性能测试通过提交单总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] >=", replacevalue = start0, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //第一天是大于等于
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[Teld.Scrum.TestFinishedTime] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                                    //最后一天要加一
            var failed = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F30本迭代_打回过提交单总数"), listquery);

            listquery.Clear();
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.TeamProject] =", replacevalue = project, notinclude = "", exectOder = "1"
            });
            listquery.Add(new WiqlReplaceColumnEntity()
            {
                column = "[System.CreatedDate] <", replacevalue = endAdd1, notinclude = "", exectOder = "1"
            });                                                                                                                                           //最后一天要加一
            var legacy = GetCommitmentListByIteration(project, ite, String.Format(Utility.QueryBaseDirectory, "15%20提交单统计分析%2F10本迭代_遗留提交单明细"), listquery);

            list.Add(all);
            list.Add(testpassed);
            list.Add(removed);
            list.Add(needperf);
            list.Add(perftestpassed);
            list.Add(failed);
            list.Add(legacy);

            return(list);
        }