Index: issue.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/issue.inc,v retrieving revision 1.304.2.6 diff -u -r1.304.2.6 issue.inc --- issue.inc 14 Apr 2008 00:27:24 -0000 1.304.2.6 +++ issue.inc 3 May 2008 00:27:45 -0000 @@ -1004,6 +1004,15 @@ } // Always let the person replying assign it to themselves. $assigned[$user->uid] = $user->name; + + // If the current user is one of the project maintainers, allow them to select + // from a list of all the project maintainers when assigning the issue. + if (db_result(db_query("SELECT nid FROM {cvs_project_maintainers} WHERE uid = %d AND nid = %d", $user->uid, $node->nid))) { + $result = db_query("SELECT m.uid, u.name FROM {cvs_project_maintainers} m INNER JOIN {users} u ON m.uid = u.uid WHERE m.uid != 0 AND m.nid = %d", $node->nid); + while ($row = db_fetch_array($result)) { + $assigned = array_flip(array_merge(array_flip($assigned), array($row['name'] => $row['uid']))); // these array acrobatics ensure that we have no duplicate values being added + } + } } }