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

@@ -1374,13 +1374,16 @@
{
if($oNode instanceof RelationObjectNode)
{
$oObj = $oNode->GetProperty('object');
$sRootClass = MetaModel::GetRootClass(get_class($oObj));
if (!array_key_exists($sRootClass, $aComputed))
if ($oNode->GetProperty('is_reached') && (!$oNode->GetProperty('source')))
{
$aComputed[$sRootClass] = array();
$oObj = $oNode->GetProperty('object');
$sRootClass = MetaModel::GetRootClass(get_class($oObj));
if (!array_key_exists($sRootClass, $aComputed))
{
$aComputed[$sRootClass] = array();
}
$aComputed[$sRootClass][$oObj->GetKey()] = $oObj;
}
$aComputed[$sRootClass][$oObj->GetKey()] = $oObj;
}
}

View File

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