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

Merge pull request #332 from protich/issue/330

Make sure dept & topic objects are set before calling getSLAId()
parents 7a1e4789 7ecf213e
No related branches found
No related tags found
No related merge requests found
......@@ -722,13 +722,14 @@ class Ticket {
# email filter? This method doesn't consider such a case
if ($trump !== null) {
$slaId = $trump;
} elseif ($this->getDept()->getSLAId()) {
} elseif ($this->getDept() && $this->getDept()->getSLAId()) {
$slaId = $this->getDept()->getSLAId();
} elseif ($this->getTopicId() && $this->getTopic()) {
} elseif ($this->getTopic() && $this->getTopic()->getSLAId()) {
$slaId = $this->getTopic()->getSLAId();
} else {
$slaId = $cfg->getDefaultSLAId();
}
return ($slaId && $this->setSLAId($slaId)) ? $slaId : false;
}
......
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