コード例 #1
0
        public static List <ProjectFAViewModules> RetrieveDoneFAData(string pjkey, Controller ctrl)
        {
            var ret = new List <ProjectFAViewModules>();

            var issuedict = IssueViewModels.RRetrieveFAByPjkey(pjkey, Resolute.Done, 2000, ctrl);

            foreach (var d in issuedict)
            {
                if (d.CommentList.Count == 2)
                {
                    bool sameas = false;
                    foreach (var com in d.CommentList)
                    {
                        if (com.Comment.Contains("<p>Issue Same As <a"))
                        {
                            sameas = true;
                            break;
                        }

                        if (com.Comment.Contains("passed") &&
                            string.Compare(com.Reporter, "System", true) == 0)
                        {
                            sameas = true;
                            break;
                        }
                    }
                    if (sameas)
                    {
                        continue;
                    }
                }

                if (d.Summary.Contains("@Burn-In Step"))
                {
                    var pjdata = BITestData.RetrieveProjectTestDataByDataID(d.IssueKey);
                    if (pjdata.Count > 0)
                    {
                        var pd = new ProjectTestData();
                        pd.ModuleSerialNum = pjdata[0].ModuleSerialNum;
                        pd.ErrAbbr         = pjdata[0].ErrAbbr;
                        pd.ProjectKey      = d.ProjectKey;
                        ret.Add(new ProjectFAViewModules(d, pd));
                    }
                }
                else
                {
                    var pjdata = ProjectTestData.RetrieveProjectTestData(d.IssueKey);
                    if (pjdata.Count > 0)
                    {
                        ret.Add(new ProjectFAViewModules(d, pjdata[0]));
                    }
                }
            }

            return(ret);
        }
コード例 #2
0
        public static List <ProjectFAViewModules> RetrievePendingFAData(string pjkey, Controller ctrl)
        {
            var ret        = new List <ProjectFAViewModules>();
            var issuedict  = IssueViewModels.RRetrieveFAByPjkey(pjkey, Resolute.Working, 50, ctrl);
            var issuedict2 = IssueViewModels.RRetrieveFAByPjkey(pjkey, Resolute.Pending, 500, ctrl);

            issuedict.AddRange(issuedict2);

            var bisndict = new Dictionary <string, string>();
            var fasndict = new Dictionary <string, string>();

            foreach (var d in issuedict)
            {
                if (d.Summary.Contains("@Burn-In Step"))
                {
                    var sn     = "";
                    var pjdata = BITestData.RetrieveProjectTestDataByDataID(d.IssueKey);
                    if (pjdata.Count > 0)
                    {
                        sn = pjdata[0].ModuleSerialNum;
                    }

                    if (!string.IsNullOrEmpty(sn) && !bisndict.ContainsKey(sn))
                    {
                        bisndict.Add(sn, d.ReportDate.ToString());
                        var pd = new ProjectTestData();
                        pd.ModuleSerialNum = sn;
                        pd.ErrAbbr         = pjdata[0].ErrAbbr;
                        pd.ProjectKey      = d.ProjectKey;
                        ret.Add(new ProjectFAViewModules(d, pd));
                    }
                    else if (!string.IsNullOrEmpty(sn) && bisndict.ContainsKey(sn))
                    {
                        //close automaticlly
                        IssueViewModels.CloseDupBIIssueAutomaticlly(d.ProjectKey, sn, bisndict[sn]);
                    }
                }
                else
                {
                    var sn     = "";
                    var pjdata = ProjectTestData.RetrieveProjectTestData(d.IssueKey);
                    if (pjdata.Count > 0)
                    {
                        sn = pjdata[0].ModuleSerialNum;
                    }

                    if (!string.IsNullOrEmpty(sn) && !fasndict.ContainsKey(sn))
                    {
                        fasndict.Add(sn, d.ReportDate.ToString());
                        ret.Add(new ProjectFAViewModules(d, pjdata[0]));
                    }
                    else if (!string.IsNullOrEmpty(sn) && fasndict.ContainsKey(sn))
                    {
                        //close automaticlly
                        IssueViewModels.CloseDupIssueAutomaticlly(d.ProjectKey, sn, fasndict[sn]);
                    }
                }
            }

            return(ret);
        }