mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
#804 (Continued) Fix for GetHilightClass (previous revision: 2952) was not sufficient + applied the same fix for GetIcon!
SVN:trunk[2968]
This commit is contained in:
@@ -1336,14 +1336,12 @@
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
$oTTOStopWatch = $this->Get('tto');
|
||||
if ($oTTOStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sIcon = self::MakeIconFromName('incident-escalated.png');
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
else if ($oTTOStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sIcon = self::MakeIconFromName('incident-deadline.png');
|
||||
}
|
||||
@@ -1356,24 +1354,18 @@
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
$oTTRStopWatch = $this->Get('ttr');
|
||||
if ($oTTRStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sIcon = self::MakeIconFromName('incident-escalated.png');
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
else if ($oTTRStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sIcon = self::MakeIconFromName('incident-deadline.png');
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
$sIcon = MetaModel::GetClassIcon(get_class($this), $bImgTag);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user