#804 tickets' highlighting is now based on the computation performed by the stopwatch, in order to support non 24x7 working hours

SVN:trunk[2952]
This commit is contained in:
Denis Flaven
2013-10-24 08:11:40 +00:00
parent 0c327f2c36
commit 02e6658439
3 changed files with 75 additions and 82 deletions

View File

@@ -1423,13 +1423,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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTOStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}
@@ -1441,13 +1440,12 @@
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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTRStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}

View File

@@ -1813,13 +1813,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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTOStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}
@@ -1831,19 +1830,17 @@
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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTRStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}
}
break;
case 'escalated_tto':
case 'escalated_ttr':
$sHilightClass = HILIGHT_CLASS_CRITICAL;

View File

@@ -1799,13 +1799,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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTOStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}
@@ -1817,13 +1816,12 @@
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))
{
$sHilightClass = HILIGHT_CLASS_CRITICAL;
}
else if ($ratio <= 0.25)
else if ($oTTRStopWatch->IsThresholdPassed(75))
{
$sHilightClass = HILIGHT_CLASS_WARNING;
}