Added capability: assign ticket to any maintainer

azbok - December 11, 2007 - 03:35
Project:Subversion
Version:5.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

The other 3 fixes were the basis to get this going. In my situation, I want any person who is a maintainer to be able to assign a ticket to any other maintainer. The feature is actually quite small:

In the function subversion_form_alter, I added

  if ($form_id == 'project_issue_node_form' ) {

    // Get the userid/name pairs for all project maintainers (pm) of the given project id (pid)
    $result = db_query('
              SELECT s.uid, name
              FROM {subversion_project_maintainers} s JOIN {users}
                   ON s.uid = users.uid
              WHERE nid = %d', $form['#node']->pid);

    while ($pm = db_fetch_object($result)) {
      $form['issue_info']['assigned']['#options'][$pm->uid] = $pm->name;
    }
  }

 
 

Drupal is a registered trademark of Dries Buytaert.