diff --git a/application/Espo/Services/InboundEmail.php b/application/Espo/Services/InboundEmail.php index be05ed1db1..45183dc0b8 100644 --- a/application/Espo/Services/InboundEmail.php +++ b/application/Espo/Services/InboundEmail.php @@ -421,6 +421,7 @@ class InboundEmail extends \Espo\Services\Record if ($user) { $case->set('assignedUserId', $user->id); + $case->set('status', 'Assigned'); } } @@ -437,6 +438,7 @@ class InboundEmail extends \Espo\Services\Record if ($user) { $case->set('assignedUserId', $user->id); + $case->set('status', 'Assigned'); } } @@ -468,19 +470,17 @@ class InboundEmail extends \Espo\Services\Record $caseDistribution = $params['caseDistribution']; } - - $targetUserPosition = null; if (!empty($params['targetUserPosition'])) { $targetUserPosition = $params['targetUserPosition']; } - $case->set('status', 'Assigned'); switch ($caseDistribution) { case 'Direct-Assignment': if ($userId) { $case->set('assignedUserId', $userId); + $case->set('status', 'Assigned'); } break; case 'Round-Robin':