Index: comment.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/comment.inc,v
retrieving revision 1.107
diff -u -F^f -r1.107 comment.inc
--- comment.inc	22 Oct 2007 18:59:06 -0000	1.107
+++ comment.inc	24 Oct 2007 19:28:45 -0000
@@ -11,6 +11,10 @@ function project_issue_comment(&$arg, $o
     $nid = is_array($arg['nid']) ? $arg['nid']['#value'] : $arg['nid'];
   }
   $node = node_load($nid);
+  // Make a copy here so we have all the original metadata, since some
+  // of it can change below.
+  $original_node = $node;
+
   if ($node->type != 'project_issue') {
     return;
   }
@@ -46,12 +50,6 @@ function project_issue_comment(&$arg, $o
       $form['project_info']['#tree'] = TRUE;
       $form['project_info']['#weight'] = -2;
 
-      // Because we've tree'd project_info, the id's for these elements must
-      // be set by hand, or the js project reloads will break.
-      $form['project_info']['pid']['#id'] = 'edit-pid';
-      $form['project_info']['rid']['#id'] = 'edit-rid';
-      $form['project_info']['component']['#id'] = 'edit-component';
-
       $form['issue_info']['#weight'] = -1;
       $form['#prefix'] = '<div class="project-issue"><div class="node-form"><div class="standard">';
       $form['#suffix'] = '</div></div></div>';
@@ -130,7 +128,7 @@ function project_issue_comment(&$arg, $o
       break;
     case 'view':
       if (isset($arg->cid)) {
-        $project_issue_table = project_issue_comment_view($node, $arg);
+        $project_issue_table = project_issue_comment_view($original_node, $arg);
       }
       else {
         $test = drupal_clone($arg);
@@ -138,7 +136,7 @@ function project_issue_comment(&$arg, $o
         $test->component = $arg->project_info['component'];
         // Add a dummy rid if necessary -- prevents incorrect change data.
         $test->rid = $arg->project_info['rid'] ? $arg->project_info['rid'] : 0;
-        $project_issue_table = _project_issue_comment_table(_project_issue_comment_labels(), $node, $test);
+        $project_issue_table = _project_issue_comment_table(_project_issue_comment_labels(), $original_node, $test);
       }
       if ($project_issue_table) {
         $arg->comment = '<div class="project-issue"><div class="summary">'. $project_issue_table .'</div></div>' . $arg->comment;
Index: issue.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/issue.inc,v
retrieving revision 1.270
diff -u -F^f -r1.270 issue.inc
--- issue.inc	22 Oct 2007 14:58:14 -0000	1.270
+++ issue.inc	24 Oct 2007 19:28:46 -0000
@@ -112,7 +112,9 @@ function project_issue_update_project($p
         }
       }
       $form = array();
-      $form['rid'] = array(
+      // Element is tree'd here to match the original form layout.
+      $form['project_info']['#tree'] = TRUE;
+      $form['project_info']['rid'] = array(
         '#type' => 'select',
         '#title' => t('Version'),
         '#default_value' => $default,
@@ -139,7 +141,9 @@ function project_issue_update_project($p
   }
 
   $form = array();
-  $form['component'] = array(
+  // Element is tree'd here to match the original form layout.
+  $form['project_info']['#tree'] = TRUE;
+  $form['project_info']['component'] = array(
     '#type' => 'select',
     '#title' => t('Component'),
     '#default_value' => $cid,
Index: project_issue.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/project_issue.js,v
retrieving revision 1.3
diff -u -F^f -r1.3 project_issue.js
--- project_issue.js	19 Aug 2007 23:23:37 -0000	1.3
+++ project_issue.js	24 Oct 2007 19:28:46 -0000
@@ -1,20 +1,20 @@
 /* $Id: project_issue.js,v 1.3 2007/08/19 23:23:37 dww Exp $ */
 
 Drupal.projectSwitchAutoAttach = function () {
-  $('#edit-pid').change(function () {
+  $('#edit-project-info-pid').change(function () {
     var pid = this.value;
 
     // Temporarily disable the dynamic selects while we retrieve the new info.
     // The newly loaded selects will be enabled by default.
-    $('#edit-rid, #edit-component').attr('disabled', 'disabled');
+    $('#edit-project-info-rid, #edit-project-info-component').attr('disabled', 'disabled');
 
     // Get existing component setting.
-    var cid = $('#edit-component').val();
+    var cid = $('#edit-project-info-component').val();
     cid = Drupal.encodeURIComponent(cid);
 
     // Get existing version label.
-    var nid = $('#edit-rid').val();
-    var rid = $('#edit-rid option[@value=' + nid + ']').text();
+    var nid = $('#edit-project-info-rid').val();
+    var rid = $('#edit-project-info-rid option[@value=' + nid + ']').text();
     rid = Drupal.encodeURIComponent(rid);
 
     // Pass new project ID, existing version, existing component.
@@ -31,8 +31,8 @@
           alert(result.error);
         }
         else {
-          $('#edit-rid, #edit-component').parent().remove();
-          $('#edit-pid').parent().after(result.component).after(result.rid);
+          $('#edit-project-info-rid, #edit-project-info-component').parent().remove();
+          $('#edit-project-info-pid').parent().after(result.component).after(result.rid);
         }
       },
       error: function (xmlhttp) {
