mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 06:48:50 +02:00
Make sure that 'source' nodes for ComputedImpactedItems are not added twice to the ticket.
SVN:trunk[3571]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user