Index: modules/project/issue.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project/issue.inc,v retrieving revision 1.117 diff -u -r1.117 issue.inc --- modules/project/issue.inc 22 Sep 2005 17:07:59 -0000 1.117 +++ modules/project/issue.inc 24 Sep 2005 05:23:06 -0000 @@ -298,6 +298,23 @@ $user->uid => $user->name ); } + // If organic groups are enabled, add any members in an a group associated with the project to the list of potential assignees. + if (module_exist('og')) { + // Find any groups that this project is assigned to. + if ($groups = og_get_node_groups($project)) { + foreach(array_keys($groups) as $gid) { + $users = array(); + $result = db_query(og_list_users_sql(), $gid); + while ($item = db_fetch_object($result)) { + $users[$item->uid] = $item->name; + } + // Only add other group members to potential assignees if the current user is a group member. + if (in_array($user->uid, array_keys($users))) { + $assigned = $assigned + $users; + } + } + } + } $group1 = form_select(t('Project'), 'pid', $node->pid, $projects, NULL, 0, FALSE, TRUE); if ($releases) {