Index: openacs-4/packages/project-manager/templates/task-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/templates/task-ae.tcl,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/project-manager/templates/task-ae.tcl	22 Jan 2007 16:48:34 -0000	1.15
+++ openacs-4/packages/project-manager/templates/task-ae.tcl	22 Jan 2007 18:31:28 -0000	1.16
@@ -42,7 +42,7 @@
     if {[string is false $open_p]} {
         set project_options [list [list [pm::project::name -project_item_id $project_item_id] $project_item_id]]
     } else {
-	set project_options [pm::project::get_list_of_open]
+	set project_options [pm::project::get_list_of_open -object_package_id $package_id]
     }
     db_1row get_dynamic_form {}
 } else {
@@ -115,6 +115,22 @@
             {options $boolean_options}
         }
     }
+
+
+if {[string is true $edit_p]} {
+    ad_form -extend -name task_add_edit \
+	-form {
+	    {project_item_id:text(select),optional
+		{label $project_term}
+		{options $project_options}
+	    }
+	}
+} else {
+    ad_form -extend -name task_add_edit \
+	-form {
+	    {project_item_id:text(hidden)}
+	}
+}
         
 if {[string is true $using_process_p]} {
     ad_form -extend -name task_add_edit \
@@ -273,22 +289,6 @@
 	    }
 	}
 }
-
-
-if {[string is true $edit_p]} {
-    ad_form -extend -name task_add_edit \
-	-form {
-	    {project_item_id:text(select),optional
-		{label $project_term}
-		{options $project_options}
-	    }
-	}
-} else {
-    ad_form -extend -name task_add_edit \
-	-form {
-	    {project_item_id:text(hidden)}
-	}
-}
         
 ad_form -extend -name task_add_edit \
     -form {