mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 07:12:26 +02:00
Rework of the edition of 1-N and N-N links: managed as a delta from the GUI down to the the lowest APIs.
- Fixes the management of obsolete linked data. - N.744 Fixes concurrent modifications (example: a user modifies a team, another user modifies a person related to that same team). Still NOT fixed with the customer portal. - N.849 Fixes links edition in the case some data are not allowed to the current user (organization silos) -TO BE TESTED - #1145 Fixes the creation of duplicate links in one step (Server to NW Device) - #1147 Fixes the update of duplicate links SVN:trunk[4766]
This commit is contained in:
@@ -195,8 +195,6 @@ class _Ticket extends cmdbAbstractObject
|
||||
}
|
||||
}
|
||||
|
||||
$oContactsSet = DBObjectSet::FromScratch('lnkContactToTicket');
|
||||
|
||||
$sContextKey = 'itop-tickets/relation_context/'.get_class($this).'/impacts/down';
|
||||
$aContextDefs = DisplayableGraph::GetContextDefinitions($sContextKey, true, array('this' => $this));
|
||||
$aDefaultContexts = array();
|
||||
@@ -219,7 +217,6 @@ class _Ticket extends cmdbAbstractObject
|
||||
{
|
||||
$oObj = $oNode->GetProperty('object');
|
||||
$iKey = $oObj->GetKey();
|
||||
$sRootClass = MetaModel::GetRootClass(get_class($oObj));
|
||||
$aGraphObjects[get_class($oObj).'::'.$iKey] = $oNode->GetProperty('object');
|
||||
}
|
||||
}
|
||||
@@ -235,7 +232,6 @@ class _Ticket extends cmdbAbstractObject
|
||||
{
|
||||
$oObj = $oNode->GetProperty('object');
|
||||
$iKey = $oObj->GetKey();
|
||||
$sRootClass = MetaModel::GetRootClass(get_class($oObj));
|
||||
$aGraphObjects[get_class($oObj).'::'.$iKey] = $oNode->GetProperty('object');
|
||||
}
|
||||
}
|
||||
@@ -247,8 +243,8 @@ class _Ticket extends cmdbAbstractObject
|
||||
$sRootClass = MetaModel::GetRootClass(get_class($oObj));
|
||||
switch ($sRootClass)
|
||||
{
|
||||
case 'FunctionalCI':
|
||||
// Only link FunctionalCIs which are not already linked to the ticket
|
||||
case 'FunctionalCI':
|
||||
// Only FunctionalCIs which are not already linked to the ticket
|
||||
if (!array_key_exists($iKey, $aCIsToImpactCode) || ($aCIsToImpactCode[$iKey] != 'not_impacted'))
|
||||
{
|
||||
$oNewLink = new lnkFunctionalCIToTicket();
|
||||
|
||||
Reference in New Issue
Block a user