diff --git a/include/class.organization.php b/include/class.organization.php index ad9deec88962651e0858e98a47b658d3e46b53ee..908638685511bee16b87fdff82d3234f296c874a 100644 --- a/include/class.organization.php +++ b/include/class.organization.php @@ -40,6 +40,10 @@ class OrganizationModel extends VerySimpleModel { return $this->name; } + function getAccountManagerId() { + return $this->staff_id; + } + function getUpdateDate() { return $this->updated; } diff --git a/include/class.ticket.php b/include/class.ticket.php index a61717b811dcbd94460edd0167e135262dbbef67..57235d31b55a62bda807599d087983734f2e1c9e 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2333,6 +2333,12 @@ class Ticket { $source = 'Email'; } + // Auto assignment to organization account manager + if (($org = $user->getOrganization()) && $org->getAccountManagerId()) { + if (!isset($vars['staffId'])) + $vars['staffId'] = $org->getAccountManagerId(); + } + // Intenal mapping magic...see if we need to override anything if (isset($topic)) { $deptId = $deptId ?: $topic->getDeptId();