break;
    case 'solution':
        $slatarget = $servicelevel->resolution_days * $working_day_mins;
        break;
    default:
        $slaremain = 0;
        $slatarget = 0;
}
if ($slatarget > 0) {
    $slaremain = $slatarget - $target->since;
} else {
    $slaremain = 0;
}
$targettype = target_type_name($target->type);
// Get next review time
$reviewsince = incident_get_next_review($incidentid);
// time since last review in minutes
$reviewtarget = $servicelevel->review_days * $working_day_mins;
// how often reviews should happen in minutes
if ($reviewtarget > 0) {
    $reviewremain = $reviewtarget - $reviewsince;
} else {
    $reviewremain = 0;
}
// Color the title bar according to the SLA and priority
$class = '';
if ($slaremain != 0 and $incident->status != 2) {
    if ($slaremain - $slatarget * ((100 - $CONFIG['notice_threshold']) / 100) < 0) {
        $class = 'notice';
    }
    if ($slaremain - $slatarget * ((100 - $CONFIG['urgent_threshold']) / 100) < 0) {
         $slatarget = $servicelevel->action_plan_mins;
         break;
     case 'solution':
         $slatarget = $servicelevel->resolution_days * $working_day_mins;
         break;
     default:
         $slaremain = 0;
         $slatarget = 0;
 }
 if ($slatarget > 0) {
     $slaremain = $slatarget - $target->since;
 } else {
     $slaremain = 0;
 }
 // Get next review time
 $reviewsince = incident_get_next_review($incidents['id']);
 // time since last review in minutes
 $reviewtarget = $servicelevel->review_days * 1440;
 // how often reviews should happen in minutes
 if ($reviewtarget > 0) {
     $reviewremain = $reviewtarget - $reviewsince;
 } else {
     $reviewremain = 0;
 }
 // Remove Tags from update Body
 $update_body = parse_updatebody($update_body);
 $update_user = user_realname($update_userid, TRUE);
 // ======= Row Colors / Shading =======
 // Define Row Shading lowest to highest priority so that unimportant colors are overwritten by important ones
 switch ($queue) {
     case 1: