mirror of
https://github.com/Combodo/iTop.git
synced 2026-06-03 22:52:18 +02:00
N°9160 - Refactor UpdateChildxxxxxLog and test
This commit is contained in:
@@ -1317,7 +1317,7 @@
|
||||
<code><![CDATA[ public function UpdateChildRequestLog()
|
||||
{
|
||||
if (MetaModel::IsValidClass('UserRequest')) {
|
||||
return parent::UpdateChildTicketLog('UserRequest', 'parent_request_id', ['public_log', 'private_log']);
|
||||
return $this->UpdateChildTicketLog('UserRequest', 'parent_incident_id', ['public_log' => 'public_log', 'private_log' => 'private_log'] );
|
||||
}
|
||||
return true;
|
||||
}]]></code>
|
||||
@@ -1329,7 +1329,7 @@
|
||||
<type>LifecycleAction</type>
|
||||
<code><![CDATA[ public function UpdateChildIncidentLog()
|
||||
{
|
||||
return parent::UpdateChildTicketLog('Incident', 'parent_incident_id', ['public_log', 'private_log']);
|
||||
return $this->UpdateChildTicketLog('Incident', 'parent_incident_id', ['public_log' => 'public_log', 'private_log' => 'private_log']);
|
||||
}]]></code>
|
||||
</method>
|
||||
<method id="ComputeImpactedItems">
|
||||
|
||||
@@ -1452,8 +1452,17 @@
|
||||
<type>LifecycleAction</type>
|
||||
<code><![CDATA[ public function UpdateChildRequestLog()
|
||||
{
|
||||
return parent::UpdateChildTicketLog('UserRequest', 'parent_request_id', ['public_log', 'private_log']);
|
||||
return $this->UpdateChildTicketLog('UserRequest', 'parent_request_id', ['public_log' => 'public_log', 'private_log' => 'private_log' ]);
|
||||
}]]></code>
|
||||
</method>
|
||||
<method id="UpdateChildIncidentLog">
|
||||
<static>false</static>
|
||||
<access>public</access>
|
||||
<type>LifecycleAction</type>
|
||||
<code><![CDATA[ public function UpdateChildIncidentLog()
|
||||
{
|
||||
return $this->UpdateChildTicketLog('Incident', 'parent_request_id', ['public_log' => 'public_log', 'private_log' => 'private_log']);
|
||||
}]]></code>
|
||||
</method>
|
||||
<method id="ComputeImpactedItems">
|
||||
<static>false</static>
|
||||
@@ -1490,6 +1499,7 @@
|
||||
parent::OnUpdate();
|
||||
$this->Set('last_update', time());
|
||||
$this->UpdateChildRequestLog();
|
||||
$this->UpdateChildIncidentLog();
|
||||
}]]></code>
|
||||
</method>
|
||||
</methods>
|
||||
|
||||
@@ -1487,10 +1487,7 @@
|
||||
<type>LifecycleAction</type>
|
||||
<code><![CDATA[ public function UpdateChildRequestLog()
|
||||
{
|
||||
return $this->UpdateChildTicketLog('UserRequest', 'parent_request_id',
|
||||
['public_log' => 'public_log',
|
||||
'private_log' => 'private_log',
|
||||
]);
|
||||
return $this->UpdateChildTicketLog('UserRequest', 'parent_request_id', ['public_log' => 'public_log', 'private_log' => 'private_log'] );
|
||||
}]]></code>
|
||||
</method>
|
||||
<method id="ComputeImpactedItems">
|
||||
|
||||
Reference in New Issue
Block a user