mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-17 06:18:44 +02:00
Use the SLAComputation utility to allow plug-ins to implement more complex SLA computation schemes.
SVN:trunk[1346]
This commit is contained in:
@@ -486,9 +486,9 @@ abstract class ResponseTicket extends Ticket
|
||||
$aSLT = $this->ComputeSLT('TTO');
|
||||
if ($aSLT != null)
|
||||
{
|
||||
//echo "<p>TTO: SLT found: {$aSLT['SLT']}, value: {$aSLT['value']}</p>\n";
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$this->Set('tto_escalation_deadline', $iStartDate + $aSLT['value']);
|
||||
$oStartDate = new DateTime($this->Get('start_date'));
|
||||
$oDeadline = SLAComputation::GetDeadline($this, $aSLT['value'], $oStartDate);
|
||||
$this->Set('tto_escalation_deadline', $oDeadline->format('U'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -497,9 +497,9 @@ abstract class ResponseTicket extends Ticket
|
||||
$aSLT = $this->ComputeSLT('TTR');
|
||||
if ($aSLT != null)
|
||||
{
|
||||
//echo "<p>TTR: SLT found: {$aSLT['SLT']}, value: {$aSLT['value']}</p>\n";
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$this->Set('ttr_escalation_deadline', $iStartDate + $aSLT['value']);
|
||||
$oStartDate = new DateTime($this->Get('start_date'));
|
||||
$oDeadline = SLAComputation::GetDeadline($this, $aSLT['value'], $oStartDate);
|
||||
$this->Set('ttr_escalation_deadline', $oDeadline->format('U'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user