This commit is contained in:
Eric Espie
2022-05-31 15:37:29 +02:00
parent aed8337c51
commit c9317542c8
8 changed files with 150 additions and 66 deletions

View File

@@ -1198,7 +1198,19 @@
</state>
</states>
</lifecycle>
<methods>
<event_listeners>
<listener id="OnInsertRequested">
<event>EVENT_SERVICE_DB_INSERT_REQUESTED</event>
<callback>OnInsertRequested</callback>
<priority>0</priority>
</listener>
<listener id="OnUpdateRequested">
<event>EVENT_SERVICE_DB_UPDATE_REQUESTED</event>
<callback>OnUpdateRequested</callback>
<priority>0</priority>
</listener>
</event_listeners>
<methods>
<method id="GetTicketRefFormat">
<static>true</static>
<access>public</access>
@@ -1537,27 +1549,25 @@
$this->UpdateImpactedItems();
}]]></code>
</method>
<method id="OnInsert">
<method id="OnInsertRequested">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[
protected function OnInsert()
protected function OnInsertRequested(Combodo\iTop\Service\EventData $oEventData)
{
parent::OnInsert();
$this->ComputeImpactedItems();
$this->SetIfNull('last_update', time());
$this->SetIfNull('start_date', time());
}]]></code>
</method>
<method id="OnUpdate">
<method id="OnUpdateRequested">
<static>false</static>
<access>protected</access>
<type>Overload-DBObject</type>
<code><![CDATA[
protected function OnUpdate()
protected function OnUpdateRequested(Combodo\iTop\Service\EventData $oEventData)
{
parent::OnUpdate();
$aChanges = $this->ListChanges();
if (array_key_exists('functionalcis_list', $aChanges))
{

View File

@@ -1232,14 +1232,14 @@
</states>
</lifecycle>
<event_listeners>
<listener id="OnBeforeInsertEvent">
<event>BeforeInsert</event>
<callback>OnBeforeInsertEvent</callback>
<listener id="OnInsertRequested">
<event>EVENT_SERVICE_DB_INSERT_REQUESTED</event>
<callback>OnInsertRequested</callback>
<priority>0</priority>
</listener>
<listener id="OnBeforeUpdateEvent">
<event>BeforeUpdate</event>
<callback>OnBeforeUpdateEvent</callback>
<listener id="OnUpdateRequested">
<event>EVENT_SERVICE_DB_UPDATE_REQUESTED</event>
<callback>OnUpdateRequested</callback>
<priority>0</priority>
</listener>
</event_listeners>
@@ -1594,12 +1594,12 @@
$this->UpdateImpactedItems();
}]]></code>
</method>
<method id="OnBeforeInsertEvent">
<method id="OnInsertRequested">
<static>false</static>
<access>public</access>
<type>Internal</type>
<code><![CDATA[
public function OnBeforeInsertEvent(Combodo\iTop\Service\EventData $oEventData)
public function OnInsertRequested(Combodo\iTop\Service\EventData $oEventData)
{
$this->ComputeImpactedItems();
@@ -1607,12 +1607,12 @@
$this->SetIfNull('start_date', time());
}]]></code>
</method>
<method id="OnBeforeUpdateEvent">
<method id="OnUpdateRequested">
<static>false</static>
<access>public</access>
<type>Internal</type>
<code><![CDATA[
public function OnBeforeUpdateEvent(Combodo\iTop\Service\EventData $oEventData)
public function OnUpdateRequested(Combodo\iTop\Service\EventData $oEventData)
{
$aChanges = $this->ListChanges();
if (array_key_exists('functionalcis_list', $aChanges))