Index: issue.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/issue.inc,v retrieving revision 1.295 diff -u -r1.295 issue.inc --- issue.inc 31 Jan 2008 00:22:17 -0000 1.295 +++ issue.inc 26 Feb 2008 21:38:06 -0000 @@ -682,20 +682,12 @@ // Setup the array of choices for who the issue is assigned to. $assigned = array(); - if (empty($node->assigned)) { - $assigned[0] = t('Unassigned'); + foreach (module_implements('project_issue_assignees') as $module) { + $function = "{$module}_project_issue_assignees"; + $function($assigned, $node); } - else { - // It's currently assigned, so always let people unassign it. - $assigned[0] = t('Unassign'); - if ($user->uid != $node->assigned) { - // Assigned to someone else, add the currently assigned user. - $account = user_load(array('uid' => $node->assigned)); - $assigned[$node->assigned] = $account->name; - } - } - // Always let the person replying assign it to themselves. - $assigned[$user->uid] = $user->name; + asort($assigned); + $assigned = array(0 => empty($node->assigned) ? t('Unassigned') : t('Unassign')) + $assigned; if (trim($project->help)) { $form['project_help'] = array( @@ -884,6 +876,20 @@ } /** + * Implementation of hook_project_issue_assignees() + */ +function project_issue_project_issue_assignees(&$assigned, $node) { + global $user; + if ($user->uid != $node->assigned) { + // Assigned to someone else, add the currently assigned user. + $account = user_load(array('uid' => $node->assigned)); + $assigned[$node->assigned] = $account->name; + } + // Always let the person replying assign it to themselves. + $assigned[$user->uid] = $user->name; +} + +/** * Themes the metadata table and internal page links for issue nodes. * * @param $summary_table_rows