mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/3.1' into develop
This commit is contained in:
@@ -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">
|
||||
|
||||
@@ -1567,7 +1567,6 @@
|
||||
protected function OnInsert()
|
||||
{
|
||||
parent::OnInsert();
|
||||
$this->ComputeImpactedItems();
|
||||
$this->SetIfNull('last_update', time());
|
||||
$this->SetIfNull('start_date', time());
|
||||
}]]></code>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -83,6 +83,7 @@ class TransactionsTest extends ItopTestCase
|
||||
$oLinkSet = $oTicket->Get('contacts_list');
|
||||
$oLinkSet->AddItem(MetaModel::NewObject('lnkContactToTicket', ['contact_id' => 6]));
|
||||
$oLinkSet->AddItem(MetaModel::NewObject('lnkContactToTicket', ['contact_id' => 7]));
|
||||
$oTicket->Set('contacts_list', $oLinkSet);
|
||||
|
||||
$this->oMySQLiMock->SetFailAt($iFailAt);
|
||||
$this->debug("---> DBInsert()");
|
||||
@@ -188,7 +189,7 @@ class TransactionsTest extends ItopTestCase
|
||||
$oLinkSet = $oTicket->Get('contacts_list');
|
||||
$oLinkSet->AddItem(MetaModel::NewObject('lnkContactToTicket', ['contact_id' => 6]));
|
||||
$oLinkSet->AddItem(MetaModel::NewObject('lnkContactToTicket', ['contact_id' => 7]));
|
||||
//$oTicket->Set('contacts_list', $oLinkSet);
|
||||
$oTicket->Set('contacts_list', $oLinkSet);
|
||||
|
||||
$this->oMySQLiMock->SetShowRequest(false);
|
||||
$oTicket->DBWrite();
|
||||
|
||||
Reference in New Issue
Block a user