Skip to content
Snippets Groups Projects
Commit b41cdc7f authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #440 from protich/issue/defaultSLA

Default SLA
parents 87526d52 49ffc9eb
No related branches found
No related tags found
No related merge requests found
......@@ -720,7 +720,7 @@ class Ticket {
global $cfg;
# XXX Should the SLA be overwritten if it was originally set via an
# email filter? This method doesn't consider such a case
if ($trump !== null) {
if ($trump && is_numeric($trump)) {
$slaId = $trump;
} elseif ($this->getDept() && $this->getDept()->getSLAId()) {
$slaId = $this->getDept()->getSLAId();
......@@ -2129,7 +2129,9 @@ class Ticket {
$vars['teamId'] = $topic->getTeamId();
//set default sla.
if(!isset($vars['slaId']) && $topic->getSLAId())
if(isset($vars['slaId']))
$vars['slaId'] = $vars['slaId']?$vars['slaId']:$cfg->getDefaultSLAId();
elseif($topic && $topic->getSLAId())
$vars['slaId'] = $topic->getSLAId();
}elseif($vars['emailId'] && !$vars['deptId'] && ($email=Email::lookup($vars['emailId']))) { //Emailed Tickets
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment