diff --git a/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml b/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml
index 1dde6f534..4af5e5058 100755
--- a/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml
+++ b/datamodels/2.x/itop-change-mgmt-itil/datamodel.itop-change-mgmt-itil.xml
@@ -4526,12 +4526,12 @@
-
id)]]>
Tickets:Related:OpenChanges
- itop-change-mgmt/images/change-ongoing.png
+ itop-change-mgmt-itil/images/change-ongoing.png
-
id) AND (DATE_ADD(C.end_date, INTERVAL 3 DAY) < NOW())]]>
Tickets:Related:RecentChanges
- itop-change-mgmt/images/change-done.png
+ itop-change-mgmt-itil/images/change-done.png
@@ -4544,12 +4544,12 @@
-
id)]]>
Tickets:Related:OpenChanges
- itop-change-mgmt/images/change-ongoing.png
+ itop-change-mgmt-itil/images/change-ongoing.png
-
id) AND (DATE_ADD(C.end_date, INTERVAL 3 DAY) < NOW())]]>
Tickets:Related:RecentChanges
- itop-change-mgmt/images/change-done.png
+ itop-change-mgmt-itil/images/change-done.png
@@ -4562,12 +4562,12 @@
-
id)]]>
Tickets:Related:OpenChanges
- itop-change-mgmt/images/change-ongoing.png
+ itop-change-mgmt-itil/images/change-ongoing.png
-
id) AND (DATE_ADD(C.end_date, INTERVAL 3 DAY) < NOW())]]>
Tickets:Related:RecentChanges
- itop-change-mgmt/images/change-done.png
+ itop-change-mgmt-itil/images/change-done.png
@@ -4584,12 +4584,12 @@
-
Tickets:Related:OpenChanges
- itop-change-mgmt/images/change-ongoing.png
+ itop-change-mgmt-itil/images/change-ongoing.png
-
Tickets:Related:RecentChanges
- itop-change-mgmt/images/change-done.png
+ itop-change-mgmt-itil/images/change-done.png
@@ -4598,12 +4598,12 @@
-
Tickets:Related:OpenChanges
- itop-change-mgmt/images/change-ongoing.png
+ itop-change-mgmt-itil/images/change-ongoing.png
-
Tickets:Related:RecentChanges
- itop-change-mgmt/images/change-done.png
+ itop-change-mgmt-itil/images/change-done.png
diff --git a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml
index 6828637b8..48ec2565e 100755
--- a/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml
+++ b/datamodels/2.x/itop-incident-mgmt-itil/datamodel.itop-incident-mgmt-itil.xml
@@ -1307,34 +1307,10 @@
LifecycleAction
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);
- $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();
}]]>
@@ -1344,6 +1320,7 @@
ComputeImpactedItems();
$this->Set('last_update', time());
$this->Set('start_date', time());
@@ -1355,6 +1332,12 @@
Overload-DBObject
ListChanges();
+ if (array_key_exists('functionalcis_list', $aChanges))
+ {
+ $this->UpdateImpactedItems();
+ }
$this->Set('last_update', time());
$this->UpdateChildRequestLog();
$this->UpdateChildIncidentLog();
@@ -1771,7 +1754,7 @@
-
id)]]>
Tickets:Related:OpenIncidents
- itop-request-mgmt/images/incident-red.png
+ itop-incident-mgmt-itil/images/incident-red.png
@@ -1784,7 +1767,7 @@
-
id)]]>
Tickets:Related:OpenIncidents
- itop-request-mgmt/images/incident-red.png
+ itop-incident-mgmt-itil/images/incident-red.png
@@ -1797,7 +1780,7 @@
-
id)]]>
Tickets:Related:OpenIncidents
- itop-request-mgmt/images/incident-red.png
+ itop-incident-mgmt-itil/images/incident-red.png
@@ -1814,7 +1797,7 @@
-
Tickets:Related:OpenIncidents
- itop-request-mgmt/images/incident-red.png
+ itop-incident-mgmt-itil/images/incident-red.png
@@ -1823,7 +1806,7 @@
-
Tickets:Related:OpenIncidents
- itop-request-mgmt/images/incident-red.png
+ itop-incident-mgmt-itil/images/incident-red.png