-
1. Re: Find Members of a Group for Auto-Assigning a Task
swd_eagle Sep 28, 2010 4:28 AM (in response to achitaley)You'll have to do this in an AssignmentHandler, but should be pretty easy.
You will have to look at the IdentityService and providing your custom implementation of that.
Specifically, you will need to implement:
public List<User> findUsersByGroup(String groupId)
to get the users in your group. Once you have those, you can easily use:
taskService.findPersonalTasks(user)
to get the tasks for every user in the group and assign your new task to the user with the fewest tasks.
When automatically assigning tasks, you also have to have a mechanism that checks that the user is capable of processing the task. Its no use assigning tasks to a user who just went on a 6-month maternaty leave! Typically we try to avoid auto-assigning of tasks. But we do have proper reporting that indicates which tasks are left unattended and which users are underperforming.