Index: drupalorg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/drupalorg.module,v
retrieving revision 1.19
diff -u -r1.19 drupalorg.module
--- drupalorg.module	12 Apr 2008 19:57:55 -0000	1.19
+++ drupalorg.module	3 May 2008 00:49:48 -0000
@@ -153,3 +153,20 @@
   // Link to security handbook page.
   $all_links['support']['links']['report_security_issue'] = l(t('Report a security issue'), 'security-team');
 }
+
+/**
+ * Implementation of hook_project_issue_assignees().
+ */
+function drupalorg_project_issue_assignees(&$assigned, $node) {
+  global $user;
+  if ($user->uid) {
+    // 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
+      }
+    }
+  }
+}
