N°7054 - Rework the UpdateImpactedItems calls on Tickets

This commit is contained in:
Eric Espie
2023-12-12 10:40:48 +01:00
parent 797aae58e3
commit e748d72c03
4 changed files with 18 additions and 11 deletions

View File

@@ -1493,10 +1493,9 @@
<code><![CDATA[ protected function OnInsert()
{
parent::OnInsert();
$this->ComputeImpactedItems();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
parent::OnInsert();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
}]]></code>
</method>
<method id="OnUpdate">

View File

@@ -1567,7 +1567,6 @@
protected function OnInsert()
{
parent::OnInsert();
$this->ComputeImpactedItems();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
}]]></code>

View File

@@ -1608,11 +1608,9 @@
<code><![CDATA[
protected function OnInsert()
{
parent::OnInsert();
$this->ComputeImpactedItems();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
parent::OnInsert();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
}]]></code>
</method>
<method id="OnUpdate">

View File

@@ -224,11 +224,22 @@
<event_listeners>
<event_listener id="UpdateImpactAnalysis">
<event>EVENT_DB_LINKS_CHANGED</event>
<callback>UpdateImpactedItems</callback>
<callback>OnLinksChangedTicket</callback>
<rank>0</rank>
</event_listener>
</event_listeners>
<methods>
<method id="OnLinksChangedTicket">
<static>false</static>
<access>public</access>
<type>EventListener</type>
<code><![CDATA[
public function OnLinksChangedTicket(Combodo\iTop\Service\Events\EventData $oEventData)
{
$this->UpdateImpactedItems();
}
]]></code>
</method>
<method id="DBInsertNoReload">
<static>false</static>
<access>public</access>