从HP ALM中的版本中获取周期名称

本文关键字:周期 获取 HP ALM 版本 | 更新日期: 2023-09-27 18:11:12

通过以下方式创建对象,我已经成功地从Testsets和Defects部分检索了所有字段。(通过使用c#)

TDConnection qcc = qccTDConnection;
BugFactory bfact = (BugFactory)qcc.BugFactory;
List bugs = (List)bfact.NewList(bf.Filter.Text);
foreach (TDAPIOLELib.Bug bg in bugs)
{
   status = Convert.ToString(bg["BG_STATUS"]);
   assignTo = bg.AssignedTo.ToString();
   priority = Convert.ToString(bg["BG_PRIORITY"]); // PRIORITY VERY HIGH
 }

这很好,但现在我想从发布(循环,文件夹…). 在这里,我尝试像下面,但它不能工作。

ReleaseFolderfactory rel = (Release)qcc.ReleaseFolderFactory;
List listRel = (List)rel.NewList(rel.Filter.Text);
foreach(TDAPIOLELib.Release rl in listRel)
{
  string PlanStartDate = Convert.ToString(rl["RCYC_START_DATE"]);
  string PlanEndDate = Convert.ToString(rl["RCYC_START_DATE"]);
}
谁能帮我解决这个问题?

从HP ALM中的版本中获取周期名称

最后…这就是解决办法。

ReleaseFactory rel = qcc.ReleaseFactory;

List List = (List)rel.NewList(rel.Filter.Text);
        foreach (TDAPIOLELib.Release rl in listRel)
        {
            string RelStartDate = Convert.ToString(rl.StartDate);
            string RelEndDate = Convert.ToString(rl.EndDate);
            CycleFactory CyF = rl.CycleFactory;
            foreach (TDAPIOLELib.Cycle Cyc in CyF.NewList(""))
             {
                    string CycleStartDate = Convert.ToString(Cyc.StartDate);
                    string CycleEndDate = Convert.ToString(Cyc.EndDate);
             }

        }