Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-functions-create.sql,v
diff -u -r1.13.2.3 -r1.13.2.4
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	2 Jul 2004 23:13:48 -0000	1.13.2.3
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	26 Oct 2004 01:22:27 -0000	1.13.2.4
@@ -434,7 +434,7 @@
 -- If it is not associated with a project, then it is placed in the root
 -- project repository folder.
 
-select define_function_args('pm_task__new_task_item', 'project_id, title, description, html_p, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, status_id, creation_date, creation_user, creation_ip, package_id');
+select define_function_args('pm_task__new_task_item', 'project_id, title, description, html_p, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, status_id, process_instance_id, creation_date, creation_user, creation_ip, package_id');
 
 create or replace function pm_task__new_task_item (
         integer,        -- project_id
@@ -447,6 +447,7 @@
         numeric,        -- estimated_hours_work_min
         numeric,        -- estimated_hours_work_max,
         integer,        -- status_id
+        integer,        -- process_instance_id
         timestamptz,    -- creation_date
         integer,        -- creation_user
         varchar,        -- creation_ip
@@ -464,10 +465,11 @@
         p_estimated_hours_work_min              alias for $8;
         p_estimated_hours_work_max              alias for $9;
         p_status_id                             alias for $10;
-        p_creation_date                         alias for $11;
-        p_creation_user                         alias for $12;
-        p_creation_ip                           alias for $13;
-        p_package_id                            alias for $14;
+        p_process_instance_id                   alias for $11;
+        p_creation_date                         alias for $12;
+        p_creation_user                         alias for $13;
+        p_creation_ip                           alias for $14;
+        p_package_id                            alias for $15;
 
         v_item_id               cr_items.item_id%TYPE;
         v_revision_id           cr_revisions.revision_id%TYPE;
@@ -515,9 +517,9 @@
         PERFORM content_item__set_live_revision (v_revision_id);
 
         insert into pm_tasks (
-                task_id, task_number, status)
+                task_id, task_number, status, process_instance)
         values (
-                v_item_id, v_task_number, p_status_id);
+                v_item_id, v_task_number, p_status_id, p_process_instance_id);
 
         insert into pm_tasks_revisions (
                 task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked)
