Please check the script language
Schema properties--> scripting language
The option to set the Windows Scripting Language is available on the Properties page for a checked-out schema
Hi, am new to ClearQuest development. i am trying to debug a code not able to to do so.
I am trying to check the par/child relationship. If the Defect is being put in Completedstate it should first check the child activity is in completed state or not if not it should not put the Defect in completed state. i am trying to send the o/p to the dbwin32 console but the statement i have put in OutputDebugString is not appearing in dbwin32 so i am not able to figure out the code is executed or not...
Any help would be appreciated ?
Here is my code:
sub Defect_Validation {
my($actionname, $actiontype) = @_;
my $result;
# }
$sessionObj = $entity->GetSession();
#Display a debug string via a debugger
$sessionObj->OutputDebugString(" Inside the Defect_Validation routine.\n");
$ActList = $entity->GetFieldValue("parchildact")->GetValueAsList();
$sessionObj->OutputDebugString(" ActList= $ActList \n" );
if ( $entity->GetFieldValue("parchildact")->GetValueStatus == $CQPerlExt::CQ_HAS_VALUE)
{
foreach my $act (@$ActList)
{
# &Debug("*** BaseCMActivity:" . $act);
# Get each Activity Record
my $Act = $session->GetEntity( "BaseCMActivity", $act );
# Get the State of the Activity Record
$ActState = $Act->GetFieldValue("State")->GetValue();
# &Debug("*** State:" . $ActState);
# if the state of any associated Activity Record is NOT Completed, then fail
if ($ActState ne "Complete") {
$result = "All associated BaseCMActivities must be in the \"Complete\" State.";
return $result;
}
}
}
$result = "";
return $result;
}