mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
#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:
@@ -1417,42 +1417,40 @@
|
||||
$sHilightClass = '';
|
||||
switch($this->GetState())
|
||||
{
|
||||
case 'new':
|
||||
case 'approved':
|
||||
$iEscalationDeadline = $this->Get('tto_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'assigned':
|
||||
$iEscalationDeadline = $this->Get('ttr_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'new':
|
||||
case 'approved':
|
||||
$iEscalationDeadline = $this->Get('tto_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$oTTOStopWatch = $this->Get('tto');
|
||||
if ($oTTOStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($oTTOStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'assigned':
|
||||
$iEscalationDeadline = $this->Get('ttr_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$oTTRStopWatch = $this->Get('ttr');
|
||||
if ($oTTRStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($oTTRStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'escalated_tto':
|
||||
case 'escalated_ttr':
|
||||
|
||||
@@ -1806,44 +1806,41 @@
|
||||
{
|
||||
$sHilightClass = '';
|
||||
switch($this->GetState())
|
||||
{
|
||||
case 'new':
|
||||
case 'approved':
|
||||
$iEscalationDeadline = $this->Get('tto_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'assigned':
|
||||
$iEscalationDeadline = $this->Get('ttr_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$iStartDate = AttributeDateTime::GetAsUnixSeconds($this->Get('start_date'));
|
||||
$ratio = ($iEscalationDeadline - time())/($iEscalationDeadline - $iStartDate);
|
||||
if ($ratio <= 0)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($ratio <= 0.25)
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
{
|
||||
case 'new':
|
||||
case 'approved':
|
||||
$iEscalationDeadline = $this->Get('tto_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$oTTOStopWatch = $this->Get('tto');
|
||||
if ($oTTOStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($oTTOStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 'assigned':
|
||||
$iEscalationDeadline = $this->Get('ttr_escalation_deadline');
|
||||
if ($iEscalationDeadline != null)
|
||||
{
|
||||
// A SLA is running
|
||||
$oTTRStopWatch = $this->Get('ttr');
|
||||
if ($oTTRStopWatch->IsThresholdPassed(100))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
}
|
||||
else if ($oTTRStopWatch->IsThresholdPassed(75))
|
||||
{
|
||||
$sHilightClass = HILIGHT_CLASS_WARNING;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'escalated_tto':
|
||||
case 'escalated_ttr':
|
||||
$sHilightClass = HILIGHT_CLASS_CRITICAL;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user