// study group.
if (taskIds.isEmpty())
return new DoubleData(-1, false);
// retrieve the study group manager
StudyGroupManager mgr = getDbObject(context, StudyGroupManager.class);
if (mgr == null)
return null;
// create a study group for this list of items, and return its key
try {
int result = mgr.getPlanItemGroup(projectKeys, taskIds, true,
listenerName);
return new DoubleData(result, false);
} catch (Exception e) {
logger.log(Level.SEVERE, "Unexpected error while calculating", e);
return null;