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.6 -r1.7
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	13 Aug 2003 18:56:29 -0000	1.6
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql	21 Aug 2003 22:34:43 -0000	1.7
@@ -416,16 +416,17 @@
 -- 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', 'task_id, project_id, title, description, start_date, end_date, percent_complete, creation_date, creation_user, creation_ip, package_id');
+select define_function_args('pm_task__new_task_item', 'task_id, project_id, title, description, end_date, percent_complete, estimated_hours_work_min, estimated_hours_work_max, creation_date, creation_user, creation_ip, package_id');
 
 create function pm_task__new_task_item (
 	integer,        -- task_id
         integer,        -- project_id
         varchar,        -- title
 	varchar,        -- description
-	timestamptz,    -- start_date
 	timestamptz,    -- end_date
         numeric,        -- percent_complete
+        numeric,        -- estimated_hours_work_min
+        numeric,        -- estimated_hours_work_max,
 	timestamptz,    -- creation_date
 	integer,        -- creation_user
 	varchar,        -- creation_ip
@@ -437,13 +438,14 @@
 	p_project_id				alias for $2;
         p_title                                 alias for $3;
 	p_description				alias for $4;
-	p_start_date                            alias for $5;
-	p_end_date                              alias for $6;
-        p_percent_complete                      alias for $7;
-	p_creation_date				alias for $8;
-	p_creation_user				alias for $9;
-	p_creation_ip				alias for $10;
-	p_package_id				alias for $11;
+	p_end_date                              alias for $5;
+        p_percent_complete                      alias for $6;
+        p_estimated_hours_work_min              alias for $7;
+        p_estimated_hours_work_max              alias for $8;
+	p_creation_date				alias for $9;
+	p_creation_user				alias for $10;
+	p_creation_ip				alias for $11;
+	p_package_id				alias for $12;
 
 	v_item_id		cr_items.item_id%TYPE;
 	v_revision_id		cr_revisions.revision_id%TYPE;
@@ -496,9 +498,9 @@
                 v_item_id, v_task_number);
 
         insert into pm_tasks_revisions (
-                task_revision_id, start_date, end_date, percent_complete)
+                task_revision_id, end_date, percent_complete, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked)
         values (
-                v_revision_id, p_start_date, p_end_date, p_percent_complete);
+                v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work_min, p_estimated_hours_work_max, ''0'');
 
 	PERFORM acs_permission__grant_permission(
 		v_revision_id,
@@ -510,16 +512,18 @@
 end;' language 'plpgsql';
 
 
-select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, start_date, end_date, percent_complete, creation_date, creation_user, creation_ip, package_id');
+select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, end_date, percent_complete, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, creation_date, creation_user, creation_ip, package_id');
 
 create function pm_task__new_task_revision (
 	integer,        -- task_id (the item_id)
         integer,        -- project_id
         varchar,        -- title
 	varchar,        -- description
-	timestamptz,    -- start_date
 	timestamptz,    -- end_date
         numeric,        -- percent_complete
+        numeric,        -- estimated_hours_work_min
+        numeric,        -- estimated_hours_work_max
+        numeric,        -- actual_hours_worked
 	timestamptz,    -- creation_date
 	integer,        -- creation_user
 	varchar,        -- creation_ip
@@ -531,13 +535,15 @@
 	p_project_id				alias for $2;
         p_title                                 alias for $3;
 	p_description				alias for $4;
-	p_start_date                            alias for $5;
-	p_end_date                              alias for $6;
-        p_percent_complete                      alias for $7;
-	p_creation_date				alias for $8;
-	p_creation_user				alias for $9;
-	p_creation_ip				alias for $10;
-	p_package_id				alias for $11;
+	p_end_date                              alias for $5;
+        p_percent_complete                      alias for $6;
+        p_estimated_hours_work_min              alias for $7;
+        p_estimated_hours_work_max              alias for $8;
+        p_actual_hours_worked                   alias for $9;
+	p_creation_date				alias for $10;
+	p_creation_user				alias for $11;
+	p_creation_ip				alias for $12;
+	p_package_id				alias for $13;
 
 	v_revision_id		cr_revisions.revision_id%TYPE;
 	v_id			cr_items.item_id%TYPE;
@@ -563,9 +569,9 @@
 	PERFORM content_item__set_live_revision (v_revision_id);
 
         insert into pm_tasks_revisions (
-                task_revision_id, start_date, end_date, percent_complete)
+                task_revision_id, end_date, percent_complete, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked)
         values (
-                v_revision_id, p_start_date, p_end_date, p_percent_complete);
+                v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work_min, p_estimated_hours_work_max, p_actual_hours_worked);
 
 	PERFORM acs_permission__grant_permission(
 		v_revision_id,
@@ -602,5 +608,3 @@
         PERFORM content_item__delete(p_task_id);
         return 0;
 end;' language 'plpgsql';
-
-
