? .svn
? 140951_update_project_update_og-9-D6.patch
? 140951_update_project_update_og.patch
? 311953_limit_assigned_users.patch
Index: og_project.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/og_project/og_project.module,v
retrieving revision 1.7
diff -u -p -r1.7 og_project.module
--- og_project.module	19 Aug 2009 01:29:03 -0000	1.7
+++ og_project.module	4 Nov 2010 15:18:41 -0000
@@ -133,3 +133,29 @@ function og_project_token_values($type =
   }
 }
 
+/**
+ * Implement hook_project_issue_assignees().
+ */
+function og_project_project_issue_assignees(&$assigned, $node) {
+
+  if (isset($node->project_issue['pid'])){
+    $pid = ($node->project_issue['pid']);
+
+    if (user_access('assign and be assigned project issues')) {
+      // First we store the current user it's assigned to since that should always be allowed.
+      $current_key = key($assigned);
+      $current_value = current($assigned);
+
+      // Then we blank out the options and add back that one.
+      $assigned = array();
+      $assigned[$current_key] = $current_value;
+
+      // All active users in this group are added back in to the list.
+      $result = db_query("SELECT u.uid, name FROM {users} AS u JOIN {og_uid} as ogu ON (u.uid = ogu.uid) WHERE ogu.nid = %d AND u.status = 1", $pid);
+
+      while ($assignee = db_fetch_object($result)) {
+        $assigned[$assignee->uid] = $assignee->name;
+      }
+    }
+  }
+}
