Skip to content
Snippets Groups Projects
Commit e8acb6f1 authored by aydreeihn's avatar aydreeihn
Browse files

skip filter actions for disabled depts or help topics

parent ccb68ea8
No related branches found
No related tags found
No related merge requests found
......@@ -286,8 +286,12 @@ class FA_RouteDepartment extends TriggerAction {
function apply(&$ticket, array $info) {
$config = $this->getConfiguration();
if ($config['dept_id'])
if ($config['dept_id']) {
$dept = Dept::lookup($config['dept_id']);
if ($dept->isActive())
$ticket['deptId'] = $config['dept_id'];
}
}
function getConfigurationOptions() {
......@@ -416,8 +420,12 @@ class FA_AssignTopic extends TriggerAction {
function apply(&$ticket, array $info) {
$config = $this->getConfiguration();
if ($config['topic_id'])
if ($config['topic_id']) {
$topic = Topic::lookup($config['topic_id']);
if ($topic->isActive())
$ticket['topicId'] = $config['topic_id'];
}
}
function getConfigurationOptions() {
......
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