从Iteration ClearQuest API中删除缺陷

时间:2017-09-25 07:13:30

标签: perl clearquest

迭代会附加多个缺陷。如何使用ClearQuest Perl API从迭代中删除特定缺陷?

$bfSession = CQSession::Build();
$bfSession->UserLogon($userID,$passwd,$dbname,$dbset);

#Get iteration Entity
$iterationEntity = $bfSession->GetEntity("tmiteration", $iteration);

#Now to add defect to Iteration i can do the following
$bfSession->EditEntity($iterationEntity, "modify");
$result = $iterationEntity->AddFieldValue("Defects", $defect);
$valResult = $iterationEntity->Validate();

if($valResult eq "")
    {
        $iterationEntity->Commit();
    }
    else
    {
        $iterationEntity->Revert();
    }

就像AddFieldValue一样,是否有任何API可以从迭代中删除缺陷?

编辑:我无法在IBM ClearQuest文档

中找到此类API

1 个答案:

答案 0 :(得分:0)

我们可以使用tslinting API从父记录中删除子记录。

$bfSession->EditEntity($IterationEntity, "modify");
$result = $IterationEntity->DeleteFieldValue("Defects", $defectId);