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.8.2.8 -r1.8.2.9
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	27 Feb 2004 22:46:12 -0000	1.8.2.8
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	6 Mar 2004 00:29:23 -0000	1.8.2.9
@@ -130,9 +130,9 @@
 -- is null.  Otherwise a project folder will be created as a sub-folder
 -- of an existing project folder.
 
-select define_function_args('pm_project__new_project_item', 'project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, customer_id, creation_date, creation_user, creation_ip, package_id');
+select define_function_args('pm_project__new_project_item', 'project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, logger_project, ongoing_p, status_id, customer_id, creation_date, creation_user, creation_ip, package_id');
 
-create function pm_project__new_project_item (
+create or replace function pm_project__new_project_item (
         varchar,        -- project_name
         varchar,        -- project_code
         integer,        -- parent_id
@@ -142,6 +142,7 @@
         timestamptz,    -- planned_end_date
         timestamptz,    -- actual_start_date
         timestamptz,    -- actual_end_date
+        integer,        -- logger_project
         char(1),        -- ongoing_p
         integer,        -- status_id
         integer,        -- customer_id (organization_id)
@@ -161,13 +162,14 @@
         p_planned_end_date                      alias for $7;
         p_actual_start_date                     alias for $8;
         p_actual_end_date                       alias for $9;
-        p_ongoing_p                             alias for $10;
-        p_status_id                             alias for $11;
-        p_customer_id                           alias for $12;
-        p_creation_date                         alias for $13;
-        p_creation_user                         alias for $14;
-        p_creation_ip                           alias for $15;
-        p_package_id                            alias for $16;
+        p_logger_project                        alias for $10;
+        p_ongoing_p                             alias for $11;
+        p_status_id                             alias for $12;
+        p_customer_id                           alias for $13;
+        p_creation_date                         alias for $14;
+        p_creation_user                         alias for $15;
+        p_creation_ip                           alias for $16;
+        p_package_id                            alias for $17;
 
         v_item_id               cr_items.item_id%TYPE;
         v_revision_id           cr_revisions.revision_id%TYPE;
@@ -225,15 +227,16 @@
                 project_id, project_code, 
                 goal, planned_start_date, 
                 planned_end_date, actual_start_date, actual_end_date, 
-                ongoing_p, estimated_finish_date, 
+                logger_project, ongoing_p, estimated_finish_date, 
                 earliest_finish_date, latest_finish_date,
                 actual_hours_completed, 
                 estimated_hours_total, status_id, customer_id) 
         values (
                 v_revision_id, p_project_code, 
                 p_goal, p_planned_start_date, 
                 p_planned_end_date, p_actual_start_date, 
-                p_actual_end_date, p_ongoing_p, p_planned_end_date,
+                p_actual_end_date, p_logger_project, p_ongoing_p, 
+                p_planned_end_date,
                 p_planned_end_date, p_planned_end_date, ''0'',
                 ''0'', p_status_id, p_customer_id
                 );
@@ -278,7 +281,7 @@
 end;' language 'plpgsql';
 
 
-select define_function_args('pm_project__new_project_revision', 'item_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, organization_id, creation_date, creation_user, creation_ip, package_id');
+select define_function_args('pm_project__new_project_revision', 'item_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, logger_project, ongoing_p, status_id, organization_id, creation_date, creation_user, creation_ip, package_id');
 
 create function pm_project__new_project_revision (
         integer,        -- item_id
@@ -291,6 +294,7 @@
         timestamptz,    -- planned_end_date
         timestamptz,    -- actual_start_date
         timestamptz,    -- actual_end_date
+        integer,        -- logger_project
         char(1),        -- ongoing_p
         integer,        -- status_id
         integer,        -- organization_id (customer)
@@ -311,13 +315,14 @@
         p_planned_end_date                      alias for $8;
         p_actual_start_date                     alias for $9;
         p_actual_end_date                       alias for $10;
-        p_ongoing_p                             alias for $11;
-        p_status_id                             alias for $12;
-        p_customer_id                           alias for $13;
-        p_creation_date                         alias for $14;
-        p_creation_user                         alias for $15;
-        p_creation_ip                           alias for $16;
-        p_package_id                            alias for $17;
+        p_logger_project                        alias for $11;
+        p_ongoing_p                             alias for $12;
+        p_status_id                             alias for $13;
+        p_customer_id                           alias for $14;
+        p_creation_date                         alias for $15;
+        p_creation_user                         alias for $16;
+        p_creation_ip                           alias for $17;
+        p_package_id                            alias for $18;
 
         v_revision_id           cr_revisions.revision_id%TYPE;
 begin
@@ -344,12 +349,14 @@
                 project_id, project_code, 
                 goal, planned_start_date, 
                 planned_end_date, actual_start_date, actual_end_date, 
+                logger_project,
                 ongoing_p, status_id, customer_id) 
         values (
                 v_revision_id, p_project_code, 
                 p_goal, p_planned_start_date, 
                 p_planned_end_date, p_actual_start_date, 
-                p_actual_end_date, p_ongoing_p, p_status_id, p_customer_id);
+                p_actual_end_date, 
+                p_logger_project, p_ongoing_p, p_status_id, p_customer_id);
 
         PERFORM acs_permission__grant_permission(
                 v_revision_id,
