N°5906 - CRUD Event - Fix listener launched twice and refactor calls to Tickets::UpdateImpactedItems()

This commit is contained in:
Eric Espie
2023-02-24 10:19:01 +01:00
parent 937313c20e
commit bb62723114
8 changed files with 27 additions and 52 deletions

View File

@@ -1022,8 +1022,7 @@
<code><![CDATA[
protected function OnInsert()
{
parent::OnInsert();
$this->UpdateImpactedItems();
parent::OnInsert();
$this->SetIfNull('creation_date', time());
$this->SetIfNull('last_update', time());
}]]></code>
@@ -1036,11 +1035,6 @@
protected function OnUpdate()
{
parent::OnUpdate();
$aChanges = $this->ListChanges();
if (array_key_exists('functionalcis_list', $aChanges))
{
$this->UpdateImpactedItems();
}
$this->Set('last_update', time());
}]]></code>
</method>