Make sure that 'source' nodes for ComputedImpactedItems are not added twice to the ticket.

SVN:trunk[3571]
This commit is contained in:
Denis Flaven
2015-04-29 17:27:40 +00:00
parent d63b4ef6d1
commit af2835e505
2 changed files with 9 additions and 6 deletions

View File

@@ -1373,6 +1373,8 @@
foreach($oIterator as $oNode) foreach($oIterator as $oNode)
{ {
if($oNode instanceof RelationObjectNode) if($oNode instanceof RelationObjectNode)
{
if ($oNode->GetProperty('is_reached') && (!$oNode->GetProperty('source')))
{ {
$oObj = $oNode->GetProperty('object'); $oObj = $oNode->GetProperty('object');
$sRootClass = MetaModel::GetRootClass(get_class($oObj)); $sRootClass = MetaModel::GetRootClass(get_class($oObj));
@@ -1382,6 +1384,7 @@
} }
$aComputed[$sRootClass][$oObj->GetKey()] = $oObj; $aComputed[$sRootClass][$oObj->GetKey()] = $oObj;
} }
}
} }
if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI'])) if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))

View File

@@ -1376,7 +1376,7 @@
{ {
if($oNode instanceof RelationObjectNode) if($oNode instanceof RelationObjectNode)
{ {
if ($oNode->GetProperty('is_reached')) if ($oNode->GetProperty('is_reached') && (!$oNode->GetProperty('source')))
{ {
$oObj = $oNode->GetProperty('object'); $oObj = $oNode->GetProperty('object');
$sRootClass = MetaModel::GetRootClass(get_class($oObj)); $sRootClass = MetaModel::GetRootClass(get_class($oObj));