0

There can multiple defects attached to an iteration.How can I remove a particular defect from iteration using 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();
    }

Just like AddFieldValue Is there is any API to remove defects from iteration?

EDIT: I was not able to find such API in IBM ClearQuest documention

A.Learn
  • 158
  • 14
  • You will have to refer to the documentation of ClearQuest. Asking for a link to documentation is off-topic on Stack Overflow unfortunately. – simbabque Sep 25 '17 at 08:17
  • @simbabque Ok... I went through the documentation but so far no luck...I am trying couple of other things to see if it solves my case... Just in case if i am able to find answer of above question, can i answer it here – A.Learn Sep 25 '17 at 08:41
  • Maybe include a link to the documentation in the question. Others might have more luck in spotting the right thing. – simbabque Sep 25 '17 at 08:45

1 Answers1

0

We can use DeleteFieldValue API to Remove Child records from parent records.

$bfSession->EditEntity($IterationEntity, "modify");
$result = $IterationEntity->DeleteFieldValue("Defects", $defectId);
A.Learn
  • 158
  • 14