Index: server/pift_server.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/server/pift_server.module,v
retrieving revision 1.22
diff -u -p -r1.22 pift_server.module
--- server/pift_server.module	26 Oct 2008 00:51:36 -0000	1.22
+++ server/pift_server.module	1 Nov 2008 18:36:24 -0000
@@ -37,7 +37,6 @@ function pift_server_cron() {
     $frequency = $send * 60;
     // Time to send again?
     if ($time > ($last_sent + $frequency)) {
-      pift_server_add_new_files();
       pift_server_retest_check();
       pift_server_send_file_data();
       // Update last sent time.
@@ -853,6 +852,10 @@ function pift_server_nodeapi(&$node, $op
           '#weight' => 51,  // Just below the upload attachments.
         );
         break;
+      case 'insert':
+        // Add newly submitted issues/followups to the send queue.
+        pift_server_add_new_files();
+        break;
       case 'delete':
         // Remove related data in the test results table.
         db_query("DELETE FROM {pift_data} WHERE nid = %d", $node->nid);
@@ -934,6 +937,10 @@ function pift_server_comment(&$comment, 
         $comment->comment .= $cids[$comment->cid];
       }
       break;
+    case 'insert':
+      // Add newly submitted issues/followups to the send queue.
+      pift_server_add_new_files();
+      break;
     case 'update':
       // If files were deleted, remove related data in the test results table.
       if (is_array($comment['files'])) {
