Ok, here comes a workaround...
It seems like there is a bug in modules/Schedulers/_AddJobsHere.php .
Sugar looks for users in $sugarFolder->assign_to_id - which is always just "admin", as there seems to be no way to assign a group mail folder to anybody but admin (at least in the Community Edition)
I think we should use those users, who are subscribed to this folder (means: who added the group mail folder in their email settings) as a basis to do the roundRobin (or leastBusy) distribution. (Doing this based on "roles" would also make sense, but I decided for the first one.)
Unfortunately there is no way to edit _AddJobsHere.php in an upgrade-safe way. (This has been announced to be fixed in 5.5.0 - so hopefully it will be the case in 5.5.2 or so...)
So at the moment I don't see any other solution than editing this file and keep track of the changes as soon as you upgrade your system.
In the above mentioned file, look for the line:
PHP Code:
$users[] = $sugarFolder->assign_to_id;
Right after, include the following:
PHP Code:
// CUSTOM EXTENSION
$q = "SELECT assigned_user_id FROM folders_subscriptions WHERE folder_id = '{$sugarFolder->id}'";
$r = $ie->db->query($q);
$users = array();
while($row = $ie->db->fetchByAssoc($r)) {
$users[] = $row['assigned_user_id'];
}
if (empty($users)) {
$users[] = $sugarFolder->assign_to_id;
}
// CUSTOM EXTENSION END
Now Round-robin should work as expected. I did not test the "least busy"-option but I assume it should work as well...
What remains is the fact that the created cases lack any status (e.g. "New") and therefore don't show up in your dashlet. A possible solution is mentioned here: http://kb.sugarcrm.com/featured/auto...inbound-email/
But this is also not upgrade-safe. Maybe someone who is familiar with logic hooks is able to fix it?!
Bookmarks