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.7 -r1.8.2.8
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	9 Feb 2004 16:27:22 -0000	1.8.2.7
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	27 Feb 2004 22:46:12 -0000	1.8.2.8
@@ -280,7 +280,7 @@
 
 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');
 
-create or replace function pm_project__new_project_revision (
+create function pm_project__new_project_revision (
         integer,        -- item_id
         varchar,        -- project_name
         varchar,        -- project_code
@@ -313,7 +313,7 @@
         p_actual_end_date                       alias for $10;
         p_ongoing_p                             alias for $11;
         p_status_id                             alias for $12;
-        p_organization_id                       alias for $13;
+        p_customer_id                           alias for $13;
         p_creation_date                         alias for $14;
         p_creation_user                         alias for $15;
         p_creation_ip                           alias for $16;
@@ -349,10 +349,8 @@
                 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_organization_id);
+                p_actual_end_date, p_ongoing_p, p_status_id, p_customer_id);
 
-        -- make sure organizations are in as well
-
         PERFORM acs_permission__grant_permission(
                 v_revision_id,
                 p_creation_user,
@@ -406,9 +404,9 @@
 returns varchar as '
 declare
     p_pm_task_id         alias for $1;
-    v_pm_task_name       pm_tasks.title%TYPE;
+    v_pm_task_name       cr_items.name%TYPE;
 begin
-        select i.name || ''_'' || p_pm_task_id into v_pm_project_name
+        select i.name || ''_'' || p_pm_task_id into v_pm_task_name
                 from cr_items i
                 where i.item_id = p_pm_task_id;
     return v_pm_task_name;
@@ -553,7 +551,7 @@
         p_actual_hours_worked                   alias for $10;
         p_status_id                             alias for $11;
         p_creation_date                         alias for $12;
-        p_creation_user                         alias for $13
+        p_creation_user                         alias for $13;
         p_creation_ip                           alias for $14;
         p_package_id                            alias for $15;
 
