diff --git a/application/itopwebpage.class.inc.php b/application/itopwebpage.class.inc.php index 0d63733b0..dc94392ce 100644 --- a/application/itopwebpage.class.inc.php +++ b/application/itopwebpage.class.inc.php @@ -218,7 +218,7 @@ EOF; }, beforeLoad: function( event, ui ) { if ( ui.tab.data('loaded') && (ui.tab.attr('data-cache') == 'true')) { - event.defaultPrevented = true; + event.preventDefault(); return; } ui.panel.html('

'.str_replace("\n", '
', htmlentities($sComments, ENT_QUOTES, 'UTF-8')).'
'.str_replace("\n", '
', htmlentities($sComments, ENT_QUOTES, 'UTF-8')).'
Get('contacts_list');
- $oToImpact = $this->Get('functionalcis_list');
-
- $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
-
- $aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
-
- if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
- {
- foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
- {
- $oNewLink = new lnkFunctionalCIToTicket();
- $oNewLink->Set('functionalci_id', $iKey);
- $oToImpact->AddObject($oNewLink);
- }
- }
- if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
- {
- foreach($aComputed['Contact'] as $iKey => $oObject)
- {
- $oNewLink = new lnkContactToTicket();
- $oNewLink->Set('contact_id', $iKey);
- $oNewLink->Set('role', 'contact automatically computed');
- $oToNotify->AddObject($oNewLink);
- }
- }
-
+ parent::OnInsert();
+ $this->UpdateImpactedItems();
$this->Set('creation_date', time());
$this->Set('last_update', time());
- }]]>
+ }]]>
+
Set('last_update', time());
- }]]>
+ ListChanges();
+ if (array_key_exists('functionalcis_list', $aChanges))
+ {
+ $this->UpdateImpactedItems();
+ }
+ $this->Set('last_update', time());
+ }]]>
+
Get('contacts_list');
- $oToImpact = $this->Get('functionalcis_list');
-
- $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
-
- $aComputed = $oImpactedInfras->GetRelatedObjects('impacts', 10);
-
- if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
- {
- foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
- {
- $oNewLink = new lnkFunctionalCIToTicket();
- $oNewLink->Set('functionalci_id', $iKey);
- $oToImpact->AddObject($oNewLink);
- }
- }
- if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
- {
- foreach($aComputed['Contact'] as $iKey => $oObject)
- {
- $oNewLink = new lnkContactToTicket();
- $oNewLink->Set('contact_id', $iKey);
- $oNewLink->Set('role', 'contact automatically computed');
- $oToNotify->AddObject($oNewLink);
- }
- }
-
+ parent::OnInsert();
+ $this->UpdateImpactedItems();
$this->Set('creation_date', time());
$this->Set('last_update', time());
}]]>
@@ -535,8 +511,15 @@
ListChanges();
+ if (array_key_exists('functionalcis_list', $aChanges))
+ {
+ $this->UpdateImpactedItems();
+ }
$this->Set('last_update', time());
}]]>
diff --git a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml
index 610d385a7..e542f87c8 100755
--- a/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml
+++ b/datamodels/2.x/itop-request-mgmt-itil/datamodel.itop-request-mgmt-itil.xml
@@ -1361,61 +1361,21 @@
Get('contacts_list');
- $oToImpact = $this->Get('functionalcis_list');
-
- $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
-
- $oGraph = $oImpactedInfras->GetRelatedObjectsDown('impacts',10, true /* bEnableRedundancy */);
- $oIterator = new RelationTypeIterator($oGraph, 'Node');
- foreach($oIterator as $oNode)
- {
- if($oNode instanceof RelationObjectNode)
- {
- if ($oNode->GetProperty('is_reached') && (!$oNode->GetProperty('source')))
- {
- $oObj = $oNode->GetProperty('object');
- $sRootClass = MetaModel::GetRootClass(get_class($oObj));
- if (!array_key_exists($sRootClass, $aComputed))
- {
- $aComputed[$sRootClass] = array();
- }
- $aComputed[$sRootClass][$oObj->GetKey()] = $oObj;
- }
- }
- }
-
- if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
- {
- foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
- {
- $oNewLink = new lnkFunctionalCIToTicket();
- $oNewLink->Set('functionalci_id', $iKey);
- $oNewLink->Set('impact', 'potentially impacted (automatically computed)');
- $oToImpact->AddObject($oNewLink);
- }
- }
- if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
- {
- foreach($aComputed['Contact'] as $iKey => $oObject)
- {
- $oNewLink = new lnkContactToTicket();
- $oNewLink->Set('contact_id', $iKey);
- $oNewLink->Set('role', 'contact automatically computed');
- $oToNotify->AddObject($oNewLink);
- }
- }
- parent::OnInsert();
+ // This method is kept for backward compatibility
+ // in case a delta redefines it, but you may call
+ // UpdateImpactedItems directly
+ $this->UpdateImpactedItems();
}]]>
ComputeImpactedItems();
$this->Set('last_update', time());
@@ -1426,8 +1386,15 @@
false
protected
Overload-DBObject
- ListChanges();
+ if (array_key_exists('functionalcis_list', $aChanges))
+ {
+ $this->UpdateImpactedItems();
+ }
$this->Set('last_update', time());
$this->UpdateChildRequestLog();
}]]>
diff --git a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml
index 7b238551c..52241a102 100755
--- a/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml
+++ b/datamodels/2.x/itop-request-mgmt/datamodel.itop-request-mgmt.xml
@@ -1363,62 +1363,23 @@
false
public
LifecycleAction
- Get('contacts_list');
- $oToImpact = $this->Get('functionalcis_list');
-
- $oImpactedInfras = DBObjectSet::FromLinkSet($this, 'functionalcis_list', 'functionalci_id');
-
- $oGraph = $oImpactedInfras->GetRelatedObjectsDown('impacts',10, true /* bEnableRedundancy */);
- $oIterator = new RelationTypeIterator($oGraph, 'Node');
- foreach($oIterator as $oNode)
- {
- if($oNode instanceof RelationObjectNode)
- {
- if ($oNode->GetProperty('is_reached') && (!$oNode->GetProperty('source')))
- {
- $oObj = $oNode->GetProperty('object');
- $sRootClass = MetaModel::GetRootClass(get_class($oObj));
- if (!array_key_exists($sRootClass, $aComputed))
- {
- $aComputed[$sRootClass] = array();
- }
- $aComputed[$sRootClass][$oObj->GetKey()] = $oObj;
- }
- }
- }
-
- if (isset($aComputed['FunctionalCI']) && is_array($aComputed['FunctionalCI']))
- {
- foreach($aComputed['FunctionalCI'] as $iKey => $oObject)
- {
- $oNewLink = new lnkFunctionalCIToTicket();
- $oNewLink->Set('functionalci_id', $iKey);
- $oNewLink->Set('impact', 'potentially impacted (automatically computed)');
- $oToImpact->AddObject($oNewLink);
- }
- }
- if (isset($aComputed['Contact']) && is_array($aComputed['Contact']))
- {
- foreach($aComputed['Contact'] as $iKey => $oObject)
- {
- $oNewLink = new lnkContactToTicket();
- $oNewLink->Set('contact_id', $iKey);
- $oNewLink->Set('role', 'contact automatically computed');
- $oToNotify->AddObject($oNewLink);
- }
- }
- parent::OnInsert();
+ // This method is kept for backward compatibility
+ // in case a delta redefines it, but you may call
+ // UpdateImpactedItems directly
+ $this->UpdateImpactedItems();
}]]>
ComputeImpactedItems();
$this->Set('last_update', time());
$this->Set('start_date', time());
@@ -1428,8 +1389,15 @@
false
protected
Overload-DBObject
- ListChanges();
+ if (array_key_exists('functionalcis_list', $aChanges))
+ {
+ $this->UpdateImpactedItems();
+ }
$this->Set('last_update', time());
$this->UpdateChildRequestLog();
}]]>
diff --git a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
index 3b7f09976..db2556d2d 100755
--- a/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
+++ b/datamodels/2.x/itop-tickets/datamodel.itop-tickets.xml
@@ -17,6 +17,7 @@
cmdbAbstractObject
+ _Ticket
true
+
+
+ manual
+ computed
+ do_not_notify
+
+ impact_code
+ manual
+ false
+ list
+
@@ -377,7 +389,7 @@
-
20
- -
+
-
30
@@ -390,7 +402,7 @@
-
20
- -
+
-
30
@@ -403,7 +415,7 @@
-
20
- -
+
-
30
@@ -465,6 +477,17 @@
true
+
+
+ manual
+ computed
+ not_impacted
+
+ impact_code
+ manual
+ false
+ list
+
@@ -476,7 +499,7 @@
-
20
- -
+
-
30
@@ -489,7 +512,7 @@
-
20
- -
+
-
30
@@ -502,7 +525,7 @@
-
20
- -
+
-
30
diff --git a/datamodels/2.x/itop-tickets/de.dict.itop-tickets.php b/datamodels/2.x/itop-tickets/de.dict.itop-tickets.php
index 5890e0a67..093e757ea 100755
--- a/datamodels/2.x/itop-tickets/de.dict.itop-tickets.php
+++ b/datamodels/2.x/itop-tickets/de.dict.itop-tickets.php
@@ -58,22 +58,31 @@ Dict::Add('DE DE', 'German', 'Deutsch', array(
'Class:Ticket/Attribute:workorders_list+' => '',
'Class:Ticket/Attribute:finalclass' => 'Typ',
'Class:Ticket/Attribute:finalclass+' => '',
+ 'Ticket:ImpactAnalysis' => 'Impact Analysis~~',
'Class:lnkContactToTicket' => 'Verknüpfung Kontakt/Ticket',
'Class:lnkContactToTicket+' => '',
'Class:lnkContactToTicket/Attribute:ticket_id' => 'Ticket',
'Class:lnkContactToTicket/Attribute:ticket_id+' => '',
'Class:lnkContactToTicket/Attribute:contact_id' => 'Kontakt',
'Class:lnkContactToTicket/Attribute:contact_id+' => '',
- 'Class:lnkContactToTicket/Attribute:role' => 'Rolle',
+ 'Class:lnkContactToTicket/Attribute:role' => 'Rolle (Text)',
'Class:lnkContactToTicket/Attribute:role+' => '',
+ 'Class:lnkContactToTicket/Attribute:role_code' => 'Rolle',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:manual' => 'Added manually~~',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:computed' => 'Computed~~',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:do_not_notify' => 'Do not notify~~',
'Class:lnkFunctionalCIToTicket' => 'Verknüpfung FunctionalCI/Ticket',
'Class:lnkFunctionalCIToTicket+' => '',
'Class:lnkFunctionalCIToTicket/Attribute:ticket_id' => 'Ticket',
'Class:lnkFunctionalCIToTicket/Attribute:ticket_id+' => '',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_id' => 'CI',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_id+' => '',
- 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Auswirkung',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Auswirkung (Text)',
'Class:lnkFunctionalCIToTicket/Attribute:impact+' => '',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code' => 'Auswirkung',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:manual' => 'Added manually~~',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:computed' => 'Computed~~',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:not_impacted' => 'Not impacted~~',
'Class:WorkOrder' => 'Arbeitsauftrag',
'Class:WorkOrder+' => '',
'Class:WorkOrder/Attribute:name' => 'Name',
diff --git a/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php b/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php
index 26d0b7bc6..2009be71b 100755
--- a/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php
+++ b/datamodels/2.x/itop-tickets/en.dict.itop-tickets.php
@@ -82,6 +82,7 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:Ticket/Attribute:workorders_list+' => 'All the work orders for this ticket',
'Class:Ticket/Attribute:finalclass' => 'Type',
'Class:Ticket/Attribute:finalclass+' => '',
+ 'Ticket:ImpactAnalysis' => 'Impact Analysis',
));
@@ -100,8 +101,12 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:lnkContactToTicket/Attribute:contact_id+' => '',
'Class:lnkContactToTicket/Attribute:contact_email' => 'Contact Email',
'Class:lnkContactToTicket/Attribute:contact_email+' => '',
- 'Class:lnkContactToTicket/Attribute:role' => 'Role',
+ 'Class:lnkContactToTicket/Attribute:role' => 'Role (text)',
'Class:lnkContactToTicket/Attribute:role+' => '',
+ 'Class:lnkContactToTicket/Attribute:role_code' => 'Role',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:manual' => 'Added manually',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:computed' => 'Computed',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:do_not_notify' => 'Do not notify',
));
//
@@ -119,8 +124,12 @@ Dict::Add('EN US', 'English', 'English', array(
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_id+' => '',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_name' => 'CI Name',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_name+' => '',
- 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Impact',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Impact (text)',
'Class:lnkFunctionalCIToTicket/Attribute:impact+' => '',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code' => 'Impact',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:manual' => 'Added manually',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:computed' => 'Computed',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:not_impacted' => 'Not impacted',
));
diff --git a/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php b/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php
index e22f9de80..52c959622 100755
--- a/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php
+++ b/datamodels/2.x/itop-tickets/fr.dict.itop-tickets.php
@@ -69,6 +69,7 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Class:Ticket/Attribute:workorders_list+' => '',
'Class:Ticket/Attribute:finalclass' => 'Type',
'Class:Ticket/Attribute:finalclass+' => '',
+ 'Ticket:ImpactAnalysis' => 'Analyse d\'Impact',
));
@@ -87,8 +88,12 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Class:lnkContactToTicket/Attribute:contact_id+' => '',
'Class:lnkContactToTicket/Attribute:contact_email' => 'Email Contact',
'Class:lnkContactToTicket/Attribute:contact_email+' => '',
- 'Class:lnkContactToTicket/Attribute:role' => 'Rôle',
+ 'Class:lnkContactToTicket/Attribute:role' => 'Rôle (texte)',
'Class:lnkContactToTicket/Attribute:role+' => '',
+ 'Class:lnkContactToTicket/Attribute:role_code' => 'Rôle',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:manual' => 'Ajouté manuellement',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:computed' => 'Calculé',
+ 'Class:lnkContactToTicket/Attribute:role_code/Value:do_not_notify' => 'Ne pas notifier',
));
//
@@ -106,8 +111,12 @@ Dict::Add('FR FR', 'French', 'Français', array(
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_id+' => '',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_name' => 'Nom CI',
'Class:lnkFunctionalCIToTicket/Attribute:functionalci_name+' => '',
- 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Impact',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact' => 'Impact (texte)',
'Class:lnkFunctionalCIToTicket/Attribute:impact+' => '',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code' => 'Impact',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:manual' => 'Ajouté manuellement',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:computed' => 'Calculé',
+ 'Class:lnkFunctionalCIToTicket/Attribute:impact_code/Value:not_impacted' => 'Non impacté',
));
diff --git a/datamodels/2.x/itop-tickets/main.itop-tickets.php b/datamodels/2.x/itop-tickets/main.itop-tickets.php
index 4cbf2ef6a..9cd0fb949 100755
--- a/datamodels/2.x/itop-tickets/main.itop-tickets.php
+++ b/datamodels/2.x/itop-tickets/main.itop-tickets.php
@@ -127,4 +127,124 @@ class ResponseTicketTTR extends ResponseTicketSLT implements iMetricComputer
}
}
+
+class _Ticket extends cmdbAbstractObject
+{
+
+ public function UpdateImpactedItems()
+ {
+ $oContactsSet = $this->Get('contacts_list');
+ $oCIsSet = $this->Get('functionalcis_list');
+
+ $aCIsToImpactCode = array();
+ $aSources = array();
+ $aExcluded = array();
+
+ $oCIsSet->Rewind();
+ while ($oLink = $oCIsSet->Fetch())
+ {
+ $iKey = $oLink->Get('functionalci_id');
+ $aCIsToImpactCode[$iKey] = $oLink->Get('impact_code');
+ if ($oLink->Get('impact_code') == 'manual')
+ {
+ $oObj = MetaModel::GetObject('FunctionalCI', $iKey);
+ $aSources[$iKey] = $oObj;
+ }
+ else if ($oLink->Get('impact_code') == 'not_impacted')
+ {
+ $oObj = MetaModel::GetObject('FunctionalCI', $iKey);
+ $aExcluded[$iKey] = $oObj;
+ }
+ }
+
+ $aContactsToRoleCode = array();
+ $oContactsSet->Rewind();
+ while ($oLink = $oContactsSet->Fetch())
+ {
+ $iKey = $oLink->Get('contact_id');
+ $aContactsToRoleCode[$iKey] = $oLink->Get('role_code');
+ if ($oLink->Get('role_code') == 'do_not_notify')
+ {
+ $oObj = MetaModel::GetObject('Contact', $iKey);
+ $aExcluded[$iKey] = $oObj;
+ }
+ }
+
+ $oNewCIsSet = DBObjectSet::FromScratch('lnkFunctionalCIToTicket');
+ foreach($aCIsToImpactCode as $iKey => $sImpactCode)
+ {
+ if ($sImpactCode != 'computed')
+ {
+ $oNewLink = new lnkFunctionalCIToTicket();
+ $oNewLink->Set('functionalci_id', $iKey);
+ $oNewLink->Set('impact_code', $sImpactCode);
+ $oNewCIsSet->AddObject($oNewLink);
+ }
+ }
+
+ $oNewContactsSet = DBObjectSet::FromScratch('lnkContactToTicket');
+ foreach($aContactsToRoleCode as $iKey => $sImpactCode)
+ {
+ if ($sImpactCode != 'computed')
+ {
+ $oNewLink = new lnkContactToTicket();
+ $oNewLink->Set('contact_id', $iKey);
+ $oNewLink->Set('role_code', $sImpactCode);
+ $oNewContactsSet->AddObject($oNewLink);
+ }
+ }
+
+ $oContactsSet = DBObjectSet::FromScratch('lnkContactToTicket');
+ $oGraph = MetaModel::GetRelatedObjectsDown('impacts', $aSources, 10, true /* bEnableRedundancy */, $aExcluded);
+ $oIterator = new RelationTypeIterator($oGraph, 'Node');
+ foreach ($oIterator as $oNode)
+ {
+ if ( ($oNode instanceof RelationObjectNode) && ($oNode->GetProperty('is_reached')) && (!$oNode->GetProperty('source')))
+ {
+ $oObj = $oNode->GetProperty('object');
+ $iKey = $oObj->GetKey();
+ $sRootClass = MetaModel::GetRootClass(get_class($oObj));
+ switch ($sRootClass)
+ {
+ case 'FunctionalCI':
+ // Only link FunctionalCIs which are not already linked to the ticket
+ if (!array_key_exists($iKey, $aCIsToImpactCode) || ($aCIsToImpactCode[$iKey] != 'not_impacted'))
+ {
+ $oNewLink = new lnkFunctionalCIToTicket();
+ $oNewLink->Set('functionalci_id', $iKey);
+ $oNewLink->Set('impact_code', 'computed');
+ $oNewCIsSet->AddObject($oNewLink);
+ }
+ break;
+
+ case 'Contact':
+ // Only link Contacts which are not already linked to the ticket
+ if (!array_key_exists($iKey, $aContactsToRoleCode) || ($aCIsToImpactCode[$iKey] != 'do_not_notify'))
+ {
+ $oNewLink = new lnkContactToTicket();
+ $oNewLink->Set('contact_id', $iKey);
+ $oNewLink->Set('role_code', 'computed');
+ $oNewContactsSet->AddObject($oNewLink);
+ }
+ break;
+ }
+ }
+ }
+ $this->Set('functionalcis_list', $oNewCIsSet);
+ $this->Set('contacts_list', $oNewContactsSet);
+ }
+
+ public function DisplayBareRelations(WebPage $oPage, $bEditMode = false)
+ {
+ parent::DisplayBareRelations($oPage, $bEditMode);
+ if (!$bEditMode)
+ {
+ $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/fraphael.js');
+ $oPage->add_linked_stylesheet(utils::GetAbsoluteUrlAppRoot().'css/jquery.contextMenu.css');
+ $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/jquery.contextMenu.js');
+ $oPage->add_linked_script(utils::GetAbsoluteUrlAppRoot().'js/simple_graph.js');
+ $oPage->AddAjaxTab(Dict::S('Ticket:ImpactAnalysis'), utils::GetAbsoluteUrlAppRoot().'pages/ajax.render.php?operation=ticket_impact&class='.get_class($this).'&id='.$this->GetKey(), true);
+ }
+ }
+}
?>
\ No newline at end of file
diff --git a/datamodels/2.x/itop-tickets/module.itop-tickets.php b/datamodels/2.x/itop-tickets/module.itop-tickets.php
index 297a9fbbe..af5e43375 100755
--- a/datamodels/2.x/itop-tickets/module.itop-tickets.php
+++ b/datamodels/2.x/itop-tickets/module.itop-tickets.php
@@ -3,7 +3,7 @@
SetupWebPage::AddModule(
__FILE__,
- 'itop-tickets/2.1.0',
+ 'itop-tickets/2.2.0',
array(
// Identification
//
@@ -22,8 +22,8 @@ SetupWebPage::AddModule(
// Components
//
'datamodel' => array(
- 'model.itop-tickets.php',
'main.itop-tickets.php',
+ 'model.itop-tickets.php',
),
'data.struct' => array(
// 'data.struct.ta-actions.xml',
diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php
index eb3ffbcba..8df4bf7ca 100644
--- a/dictionaries/de.dictionary.itop.ui.php
+++ b/dictionaries/de.dictionary.itop.ui.php
@@ -777,6 +777,7 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm
'UI:RelationGroups' => 'Gruppen',
'UI:RelationGroupNumber_N' => 'Gruppe #%1$d~~',
'UI:Relation:ExportAsPDF' => 'Export as PDF...~~',
+ 'UI:RelationOption:GroupingThreshold' => 'Grouping threshold~~',
'UI:Relation:ExportAsDocument' => 'Export as Document...~~',
'UI:Relation:DrillDown' => 'Details...~~',
'UI:Relation:PDFExportOptions' => 'PDF Export Options~~',
diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php
index f34c5c0f3..427e87f77 100644
--- a/dictionaries/dictionary.itop.ui.php
+++ b/dictionaries/dictionary.itop.ui.php
@@ -970,6 +970,7 @@ When associated with a trigger, each action is given an "order" number, specifyi
'UI:ElementsDisplayed' => 'Filtering',
'UI:RelationGroupNumber_N' => 'Group #%1$d',
'UI:Relation:ExportAsPDF' => 'Export as PDF...',
+ 'UI:RelationOption:GroupingThreshold' => 'Grouping threshold',
'UI:Relation:ExportAsDocument' => 'Export as Document...',
'UI:Relation:DrillDown' => 'Details...',
'UI:Relation:PDFExportOptions' => 'PDF Export Options',
diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php
index 73c31b106..aa95460f4 100644
--- a/dictionaries/fr.dictionary.itop.ui.php
+++ b/dictionaries/fr.dictionary.itop.ui.php
@@ -812,10 +812,11 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé
'UI:RelationGroups' => 'Groupes',
'UI:ElementsDisplayed' => 'Filtrage',
'UI:RelationGroupNumber_N' => 'Groupe n°%1$d',
- 'UI:Relation:ExportAsPDF' => 'Exportation en PDF...',
- 'UI:Relation:ExportAsDocument' => 'Exportation comme Document...',
+ 'UI:Relation:ExportAsPDF' => 'Exporter en PDF...',
+ 'UI:RelationOption:GroupingThreshold' => 'Seuil de groupage',
+ 'UI:Relation:ExportAsDocument' => 'Exporter comme Document...',
'UI:Relation:DrillDown' => 'Détails...',
- 'UI:Relation:PDFExportOptions' => 'Options de l\'Exportation PDF',
+ 'UI:Relation:PDFExportOptions' => 'Options de l\'export en PDF',
'UI:Relation:Key' => 'Légende',
'UI:Relation:Comments' => 'Commentaires',
'UI:RelationOption:Title' => 'Titre',
diff --git a/js/simple_graph.js b/js/simple_graph.js
index 4f1ea7072..c60d77443 100644
--- a/js/simple_graph.js
+++ b/js/simple_graph.js
@@ -16,13 +16,24 @@ $(function()
align: 'center',
'vertical-align': 'middle',
source_url: null,
+ sources: {},
+ excluded: {},
export_as_pdf: null,
page_format: { label: 'Page Format:', values: { A3: 'A3', A4: 'A4', Letter: 'Letter' }, 'default': 'A4'},
page_orientation: { label: 'Page Orientation:', values: { P: 'Portait', L: 'Landscape' }, 'default': 'L' },
- labels: { export_pdf_title: 'PDF Export Options', cancel: 'Cancel', 'export': 'Export', title: 'Document Title', include_list: 'Include the list of objects', comments: 'Comments' },
+ labels: {
+ export_pdf_title: 'PDF Export Options',
+ cancel: 'Cancel', 'export': 'Export',
+ title: 'Document Title',
+ include_list: 'Include the list of objects',
+ comments: 'Comments',
+ grouping_threshold: 'Grouping Threshold',
+ refresh: 'Refresh'
+ },
export_as_document: null,
drill_down: null,
- excluded: []
+ grouping_threshold: 10,
+ excluded_classes: []
},
// the constructor
@@ -352,7 +363,10 @@ $(function()
_create_toolkit_menu: function()
{
var sPopupMenuId = 'tk_graph'+this.element.attr('id');
- var sHtml = '