Index: openacs-4/packages/project-manager/project-manager.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/project-manager.info,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/project-manager/project-manager.info 3 Jun 2005 22:13:43 -0000 1.5
+++ openacs-4/packages/project-manager/project-manager.info 5 Jun 2005 00:11:04 -0000 1.6
@@ -7,14 +7,14 @@
f
f
-
+
Jade Rubick
Project management tool for OpenACS
2005-01-13
Integrated Bakery Resources
Track tasks, estimates and actual progress for a project. See the <a href="http://openacs.org/projects/dotwrk/project_management/">project page</a> for more information.
-
+
Index: openacs-4/packages/project-manager/sql/postgresql/project-manager-functions-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/sql/postgresql/project-manager-functions-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 3 Jun 2005 22:13:44 -0000 1.4
+++ openacs-4/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 5 Jun 2005 00:11:04 -0000 1.5
@@ -135,7 +135,7 @@
-- 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, mime_type, 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, mime_type, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, customer_id, dform, creation_date, creation_user, creation_ip, package_id');
create or replace function pm_project__new_project_item (
varchar, -- project_name
@@ -151,6 +151,7 @@
char(1), -- ongoing_p
integer, -- status_id
integer, -- customer_id (organization_id)
+ varchar, -- dform
timestamptz, -- creation_date
integer, -- creation_user
varchar, -- creation_ip
@@ -171,10 +172,11 @@
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_dform 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_item_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
@@ -235,15 +237,15 @@
ongoing_p, estimated_finish_date,
earliest_finish_date, latest_finish_date,
actual_hours_completed,
- estimated_hours_total, status_id, customer_id)
+ estimated_hours_total, status_id, customer_id, dform)
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_planned_end_date, p_planned_end_date, ''0'',
- ''0'', p_status_id, p_customer_id
+ ''0'', p_status_id, p_customer_id, p_dform
);
PERFORM acs_permission__grant_permission(
@@ -286,7 +288,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, ongoing_p, status_id, organization_id, dform, creation_date, creation_user, creation_ip, package_id');
create or replace function pm_project__new_project_revision (
integer, -- item_id
@@ -302,6 +304,7 @@
char(1), -- ongoing_p
integer, -- status_id
integer, -- organization_id (customer)
+ varchar, -- dform
timestamptz, -- creation_date
integer, -- creation_user
varchar, -- creation_ip
@@ -322,10 +325,11 @@
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_dform 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
@@ -352,13 +356,13 @@
project_id, project_code,
goal, planned_start_date,
planned_end_date, actual_start_date, actual_end_date,
- ongoing_p, status_id, customer_id)
+ ongoing_p, status_id, customer_id, dform)
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_ongoing_p, p_status_id, p_customer_id, p_dform);
PERFORM acs_permission__grant_permission(
v_revision_id,
@@ -429,7 +433,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, process_instance_id, creation_date, creation_user, creation_ip, package_id, priority');
+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, dform, creation_date, creation_user, creation_ip, package_id, priority');
create or replace function pm_task__new_task_item (
integer, -- project_id
@@ -443,6 +447,7 @@
numeric, -- estimated_hours_work_max,
integer, -- status_id
integer, -- process_instance_id
+ varchar, -- dform
timestamptz, -- creation_date
integer, -- creation_user
varchar, -- creation_ip
@@ -462,11 +467,12 @@
p_estimated_hours_work_max alias for $9;
p_status_id alias for $10;
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;
- p_priority alias for $16;
+ p_dform 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_priority alias for $17;
v_item_id cr_items.item_id%TYPE;
v_revision_id cr_revisions.revision_id%TYPE;
@@ -519,9 +525,9 @@
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, priority)
+ task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, priority, dform)
values (
- v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, ''0'', p_priority);
+ v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, ''0'', p_priority, p_dform);
update acs_objects set context_id = p_project_id where object_id = task_id;
@@ -535,7 +541,7 @@
end;' language 'plpgsql';
-select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, mime_type, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, creation_date, creation_user, creation_ip, package_id, priority');
+select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, mime_type, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, status_id, dform, creation_date, creation_user, creation_ip, package_id, priority');
create or replace function pm_task__new_task_revision (
integer, -- task_id (the item_id)
@@ -550,10 +556,11 @@
numeric, -- estimated_hours_work_max
numeric, -- actual_hours_worked
integer, -- status_id
+ varchar, -- dform
timestamptz, -- creation_date
integer, -- creation_user
varchar, -- creation_ip
- integer, -- package_id
+ integer, -- package_id
integer -- priority
) returns integer
as '
@@ -570,11 +577,12 @@
p_estimated_hours_work_max alias for $10;
p_actual_hours_worked alias for $11;
p_status_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_priority alias for $17;
+ p_dform 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_priority alias for $18;
v_revision_id cr_revisions.revision_id%TYPE;
v_id cr_items.item_id%TYPE;
begin
@@ -600,9 +608,9 @@
PERFORM content_item__set_live_revision (v_revision_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, priority)
+ task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, priority, dform)
values (
- v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, p_actual_hours_worked, p_priority);
+ v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, p_actual_hours_worked, p_priority, p_dform);
update pm_tasks set status = p_status_id where task_id = p_task_id;
Index: openacs-4/packages/project-manager/sql/postgresql/project-manager-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/sql/postgresql/project-manager-table-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/project-manager/sql/postgresql/project-manager-table-create.sql 3 Jun 2005 22:13:44 -0000 1.3
+++ openacs-4/packages/project-manager/sql/postgresql/project-manager-table-create.sql 5 Jun 2005 00:11:04 -0000 1.4
@@ -56,7 +56,8 @@
latest_finish_date timestamptz,
-- denormalized, taken from logger
actual_hours_completed numeric,
- estimated_hours_total numeric
+ estimated_hours_total numeric,
+ dform varchar(100) default 'implicit'
);
@@ -384,7 +385,8 @@
latest_start timestamptz,
latest_finish timestamptz,
-- How important is this task
- priority integer default 0
+ priority integer default 0,
+ dform varchar(100) default 'implicit'
);
Index: openacs-4/packages/project-manager/sql/postgresql/upgrade/upgrade-3.0d4-3.0d5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/sql/postgresql/upgrade/Attic/upgrade-3.0d4-3.0d5.sql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/project-manager/sql/postgresql/upgrade/upgrade-3.0d4-3.0d5.sql 5 Jun 2005 00:11:04 -0000 1.1
@@ -0,0 +1,406 @@
+alter table pm_projects add column dform varchar(100);
+alter table pm_projects alter column dform set default 'implicit';
+update pm_projects set dform = 'implicit';
+
+alter table pm_tasks_revisions add column dform varchar(100);
+alter table pm_tasks_revisions alter column dform set default 'implicit';
+update pm_tasks_revisions set dform = 'implicit';
+
+
+select define_function_args('pm_project__new_project_item', 'project_name, project_code, parent_id, goal, description, mime_type, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, customer_id, dform, creation_date, creation_user, creation_ip, package_id');
+
+create or replace function pm_project__new_project_item (
+ varchar, -- project_name
+ varchar, -- project_code
+ integer, -- parent_id
+ varchar, -- goal
+ varchar, -- description
+ varchar, -- mime_type
+ timestamptz, -- planned_start_date
+ timestamptz, -- planned_end_date
+ timestamptz, -- actual_start_date
+ timestamptz, -- actual_end_date
+ char(1), -- ongoing_p
+ integer, -- status_id
+ integer, -- customer_id (organization_id)
+ varchar, -- dform
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer -- package_id
+) returns integer
+as '
+declare
+ p_project_name alias for $1;
+ p_project_code alias for $2;
+ p_parent_id alias for $3;
+ p_goal alias for $4;
+ p_description alias for $5;
+ p_mime_type alias for $6;
+ p_planned_start_date alias for $7;
+ 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_dform 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_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_id cr_items.item_id%TYPE;
+ v_parent_id cr_items.parent_id%TYPE;
+begin
+ select acs_object_id_seq.nextval into v_id from dual;
+
+ v_parent_id := pm_project__get_root_folder (p_package_id, ''t'');
+
+ -- raise notice ''v_parent_id (%) p_parent_id (%)'', v_parent_id, p_parent_id;
+
+ if p_parent_id is not null
+ then
+ v_parent_id = p_parent_id;
+ end if;
+
+ -- raise notice ''v_parent_id (%) p_parent_id (%)'', v_parent_id, p_parent_id;
+
+ v_item_id := content_item__new (
+ v_id::varchar, -- name
+ v_parent_id, -- parent_id
+ v_id, -- item_id
+ null, -- locale
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_parent_id, -- context_id
+ p_creation_ip, -- creation_ip
+ ''pm_project'', -- item_subtype
+ ''pm_project'', -- content_type
+ p_project_name, -- title
+ p_description, -- description
+ p_mime_type, -- mime_type
+ null, -- nls_language
+ null -- data
+ );
+
+ v_revision_id := content_revision__new (
+ p_project_name, -- title
+ p_description, -- description
+ now(), -- publish_date
+ p_mime_type, -- mime_type
+ NULL, -- nls_language
+ NULL, -- data
+ v_item_id, -- item_id
+ NULL, -- revision_id
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip -- creation_ip
+ );
+
+ PERFORM content_item__set_live_revision (v_revision_id);
+
+ insert into pm_projects (
+ project_id, project_code,
+ goal, planned_start_date,
+ planned_end_date, actual_start_date, actual_end_date,
+ ongoing_p, estimated_finish_date,
+ earliest_finish_date, latest_finish_date,
+ actual_hours_completed,
+ estimated_hours_total, status_id, customer_id, dform)
+ 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_planned_end_date, p_planned_end_date, ''0'',
+ ''0'', p_status_id, p_customer_id, p_dform
+ );
+
+ PERFORM acs_permission__grant_permission(
+ v_revision_id,
+ p_creation_user,
+ ''admin''
+ );
+
+ return v_revision_id;
+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, dform, creation_date, creation_user, creation_ip, package_id');
+
+create or replace function pm_project__new_project_revision (
+ integer, -- item_id
+ varchar, -- project_name
+ varchar, -- project_code
+ integer, -- parent_id
+ varchar, -- goal
+ varchar, -- description
+ timestamptz, -- planned_start_date
+ timestamptz, -- planned_end_date
+ timestamptz, -- actual_start_date
+ timestamptz, -- actual_end_date
+ char(1), -- ongoing_p
+ integer, -- status_id
+ integer, -- organization_id (customer)
+ varchar, -- dform
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer -- package_id
+) returns integer
+as '
+declare
+ p_item_id alias for $1;
+ p_project_name alias for $2;
+ p_project_code alias for $3;
+ p_parent_id alias for $4;
+ p_goal alias for $5;
+ p_description alias for $6;
+ p_planned_start_date alias for $7;
+ 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_dform 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
+
+ -- the item_id is the project_id
+
+ v_revision_id := content_revision__new (
+ p_project_name, -- title
+ p_description, -- description
+ now(), -- publish_date
+ ''text/plain'', -- mime_type
+ NULL, -- nls_language
+ NULL, -- data
+ p_item_id, -- item_id
+ NULL, -- revision_id
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip -- creation_ip
+ );
+
+ PERFORM content_item__set_live_revision (v_revision_id);
+
+ insert into pm_projects (
+ project_id, project_code,
+ goal, planned_start_date,
+ planned_end_date, actual_start_date, actual_end_date,
+ ongoing_p, status_id, customer_id, dform)
+ 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_dform);
+
+ PERFORM acs_permission__grant_permission(
+ v_revision_id,
+ p_creation_user,
+ ''admin''
+ );
+
+ return v_revision_id;
+end;' language 'plpgsql';
+
+
+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, dform, creation_date, creation_user, creation_ip, package_id, priority');
+
+create or replace function pm_task__new_task_item (
+ integer, -- project_id
+ varchar, -- title
+ varchar, -- description
+ varchar, -- html_p
+ timestamptz, -- end_date
+ numeric, -- percent_complete
+ numeric, -- estimated_hours_work
+ numeric, -- estimated_hours_work_min
+ numeric, -- estimated_hours_work_max,
+ integer, -- status_id
+ integer, -- process_instance_id
+ varchar, -- dform
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer, -- package_id
+ integer -- priority
+) returns integer
+as '
+declare
+ p_project_id alias for $1;
+ p_title alias for $2;
+ p_description alias for $3;
+ p_mime_type alias for $4;
+ p_end_date alias for $5;
+ p_percent_complete alias for $6;
+ p_estimated_hours_work alias for $7;
+ p_estimated_hours_work_min alias for $8;
+ p_estimated_hours_work_max alias for $9;
+ p_status_id alias for $10;
+ p_process_instance_id alias for $11;
+ p_dform 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_priority alias for $17;
+
+ v_item_id cr_items.item_id%TYPE;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_id cr_items.item_id%TYPE;
+ v_task_number integer;
+begin
+ select acs_object_id_seq.nextval into v_id from dual;
+
+ -- We want to put the task under the project item
+
+ -- create the task_number
+
+ v_item_id := content_item__new (
+ v_id::varchar, -- name
+ p_project_id, -- parent_id
+ v_id, -- item_id
+ null, -- locale
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_package_id, -- context_id
+ p_creation_ip, -- creation_ip
+ ''pm_task'', -- item_subtype
+ ''pm_task'', -- content_type
+ p_title, -- title
+ p_description, -- description
+ p_mime_type, -- mime_type
+ null, -- nls_language
+ null -- data
+ );
+
+ v_revision_id := content_revision__new (
+ p_title, -- title
+ p_description, -- description
+ now(), -- publish_date
+ p_mime_type, -- mime_type
+ NULL, -- nls_language
+ NULL, -- data
+ v_item_id, -- item_id
+ NULL, -- revision_id
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip -- creation_ip
+ );
+
+ PERFORM content_item__set_live_revision (v_revision_id);
+
+ insert into pm_tasks (
+ task_id, task_number, status, process_instance)
+ values (
+ 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, priority, dform)
+ values (
+ v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, ''0'', p_priority, p_dform);
+
+ update acs_objects set context_id = p_project_id where object_id = task_id;
+
+ PERFORM acs_permission__grant_permission(
+ v_revision_id,
+ p_creation_user,
+ ''admin''
+ );
+
+ return v_revision_id;
+end;' language 'plpgsql';
+
+
+select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, mime_type, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, status_id, dform, creation_date, creation_user, creation_ip, package_id, priority');
+
+create or replace function pm_task__new_task_revision (
+ integer, -- task_id (the item_id)
+ integer, -- project_id
+ varchar, -- title
+ varchar, -- description
+ varchar, -- mime_type
+ timestamptz, -- end_date
+ numeric, -- percent_complete
+ numeric, -- estimated_hours_work
+ numeric, -- estimated_hours_work_min
+ numeric, -- estimated_hours_work_max
+ numeric, -- actual_hours_worked
+ integer, -- status_id
+ varchar, -- dform
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer, -- package_id
+ integer -- priority
+) returns integer
+as '
+declare
+ p_task_id alias for $1;
+ p_project_id alias for $2;
+ p_title alias for $3;
+ p_description alias for $4;
+ p_mime_type alias for $5;
+ p_end_date alias for $6;
+ p_percent_complete alias for $7;
+ p_estimated_hours_work alias for $8;
+ p_estimated_hours_work_min alias for $9;
+ p_estimated_hours_work_max alias for $10;
+ p_actual_hours_worked alias for $11;
+ p_status_id alias for $12;
+ p_dform 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_priority alias for $18;
+ v_revision_id cr_revisions.revision_id%TYPE;
+ v_id cr_items.item_id%TYPE;
+begin
+ select acs_object_id_seq.nextval into v_id from dual;
+
+ -- We want to put the task under the project item
+ update cr_items set parent_id = p_project_id where item_id = p_task_id;
+
+ v_revision_id := content_revision__new (
+ p_title, -- title
+ p_description, -- description
+ now(), -- publish_date
+ p_mime_type, -- mime_type
+ NULL, -- nls_language
+ NULL, -- data
+ p_task_id, -- item_id
+ NULL, -- revision_id
+ now(), -- creation_date
+ p_creation_user, -- creation_user
+ p_creation_ip -- creation_ip
+ );
+
+ PERFORM content_item__set_live_revision (v_revision_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, priority, dform)
+ values (
+ v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, p_actual_hours_worked, p_priority, p_dform);
+
+ update pm_tasks set status = p_status_id where task_id = p_task_id;
+
+ PERFORM acs_permission__grant_permission(
+ v_revision_id,
+ p_creation_user,
+ ''admin''
+ );
+
+ return v_revision_id;
+end;' language 'plpgsql';
Index: openacs-4/packages/project-manager/tcl/install-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/install-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/project-manager/tcl/install-procs.tcl 3 Jun 2005 22:13:44 -0000 1.8
+++ openacs-4/packages/project-manager/tcl/install-procs.tcl 5 Jun 2005 00:11:04 -0000 1.9
@@ -32,6 +32,7 @@
content::type::attribute::new -content_type {pm_project} -attribute_name {actual_hours_completed} -datatype {number} -pretty_name {Actual hours completed} -pretty_plural {Actual hours completed} -column_spec {numeric}
content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_hours_total} -datatype {number} -pretty_name {Estimated hours total} -pretty_plural {Estimated hours total} -column_spec {numeric}
content::type::attribute::new -content_type {pm_project} -attribute_name {customer_id} -datatype {integer} -pretty_name {Customer} -pretty_plural {Customers} -column_spec {integer}
+ content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)}
## Create pm_task
dtype::create -name {pm_task} -supertype {content_revision} -pretty_name {Task} -pretty_plural {Tasks} -table_name {pm_tasks_revisions} -id_column {task_revision_id}
@@ -46,6 +47,7 @@
content::type::attribute::new -content_type {pm_task} -attribute_name {latest_start} -datatype {date} -pretty_name {Latest start date} -pretty_plural {Latest start dates} -column_spec {timestamptz}
content::type::attribute::new -content_type {pm_task} -attribute_name {latest_finish} -datatype {date} -pretty_name {Latest finish date} -pretty_plural {Latest finish dates} -column_spec {timestamptz}
content::type::attribute::new -content_type {pm_task} -attribute_name {priority} -datatype {integer} -pretty_name {Priority} -pretty_plural {Priorities} -column_spec {integer}
+ content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)}
# Create new relationship type for Application Links
rel_types::new "application_link" "Application Link" "Application Links" apm_package 0 "" apm_package 0 ""
@@ -302,5 +304,9 @@
3.0d3 3.0d4 {
content::type::attribute::delete -content_type {pm_project} -attribute_name {logger_project}
}
+ 3.0d4 3.0d5 {
+ content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)}
+ content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)}
+ }
}
}
Index: openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 3 Jun 2005 22:13:44 -0000 1.3
+++ openacs-4/packages/project-manager/tcl/project-procs-postgresql.xql 5 Jun 2005 00:11:04 -0000 1.4
@@ -62,6 +62,7 @@
:ongoing_p,
:status_id,
:organization_id,
+ :dform,
current_timestamp,
:creation_user,
:creation_ip,
Index: openacs-4/packages/project-manager/tcl/project-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/project-manager/tcl/project-procs.tcl 3 Jun 2005 22:13:44 -0000 1.4
+++ openacs-4/packages/project-manager/tcl/project-procs.tcl 5 Jun 2005 00:11:04 -0000 1.5
@@ -191,6 +191,7 @@
{-ongoing_p "f"}
-status_id:required
-organization_id:required
+ {-dform "implicit"}
{-creation_date ""}
-creation_user:required
-creation_ip:required
@@ -281,6 +282,7 @@
{-ongoing_p "f"}
-status_id:required
-organization_id:required
+ {-dform "implicit"}
{-creation_date ""}
-creation_user:required
-creation_ip:required
@@ -316,6 +318,7 @@
:ongoing_p,
:status_id,
:organization_id,
+ :dform,
now(),
:creation_user,
:creation_ip,
Index: openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 3 Jun 2005 22:13:44 -0000 1.2
+++ openacs-4/packages/project-manager/tcl/task-procs-postgresql.xql 5 Jun 2005 00:11:04 -0000 1.3
@@ -189,6 +189,7 @@
:estimated_hours_work_max,
:actual_hours_worked,
:status_id,
+ :dform,
current_timestamp,
:update_user,
:update_ip,
@@ -211,6 +212,7 @@
:estimated_hours_work_max,
:status_id,
:process_instance_id,
+ :dform,
coalesce (:creation_date,current_timestamp),
:creation_user,
:creation_ip,
Index: openacs-4/packages/project-manager/tcl/task-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/task-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/project-manager/tcl/task-procs.tcl 3 Jun 2005 22:13:44 -0000 1.4
+++ openacs-4/packages/project-manager/tcl/task-procs.tcl 5 Jun 2005 00:11:04 -0000 1.5
@@ -624,6 +624,7 @@
-estimated_hours_work:required
-estimated_hours_work_min:required
-estimated_hours_work_max:required
+ {-dform "implicit"}
-update_user:required
-update_ip:required
-package_id:required
@@ -707,6 +708,7 @@
{-creation_date ""}
{-status_id ""}
{-process_instance_id ""}
+ {-dform "implicit"}
-creation_user:required
-creation_ip:required
-package_id:required
Index: openacs-4/packages/project-manager/www/add-edit-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/add-edit-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/project-manager/www/add-edit-oracle.xql 3 Jun 2005 22:13:44 -0000 1.2
+++ openacs-4/packages/project-manager/www/add-edit-oracle.xql 5 Jun 2005 00:11:05 -0000 1.3
@@ -14,6 +14,7 @@
to_char(p.planned_start_date,'YYYY-MM-DD') as planned_start_date,
to_char(p.planned_end_date,'YYYY-MM-DD') as planned_end_date,
p.ongoing_p
+ p.dform
FROM pm_projectsx p
WHERE p.item_id = :project_item_id and
p.project_id = :project_id
Index: openacs-4/packages/project-manager/www/add-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/add-edit-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/project-manager/www/add-edit-postgresql.xql 3 Jun 2005 22:13:44 -0000 1.2
+++ openacs-4/packages/project-manager/www/add-edit-postgresql.xql 5 Jun 2005 00:11:05 -0000 1.3
@@ -14,7 +14,8 @@
p.status_id,
to_char(p.planned_start_date,'YYYY-MM-DD') as planned_start_date,
to_char(p.planned_end_date,'YYYY-MM-DD') as planned_end_date,
- p.ongoing_p
+ p.ongoing_p,
+ p.dform
FROM
pm_projectsx p
WHERE
Index: openacs-4/packages/project-manager/www/add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/add-edit.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/project-manager/www/add-edit.tcl 4 Jun 2005 12:52:21 -0000 1.7
+++ openacs-4/packages/project-manager/www/add-edit.tcl 5 Jun 2005 00:11:05 -0000 1.8
@@ -92,6 +92,8 @@
{value $project_item_id}
}
+ {dform:text(hidden)}
+
{project_name:text
{label "[_ project-manager.lt_set_project_term_name]"}
{value $project_name}
@@ -238,7 +240,7 @@
-form add_edit \
-cr_widget none \
-defaults [list title $project_name description $description mime_type "text/plain" context_id $parent_id parent_id $parent_id object_type pm_project] \
- -default_fields {project_code goal {planned_start_date $planned_start_date_sql} {planned_end_date $planned_end_date_sql} actual_start_date actual_end_date ongoing_p status_id customer_id} \
+ -default_fields {project_code goal {planned_start_date $planned_start_date_sql} {planned_end_date $planned_end_date_sql} actual_start_date actual_end_date ongoing_p status_id customer_id dform} \
-exclude_static]
set project_item_id [pm::project::get_project_item_id -project_id $project_id]
@@ -273,7 +275,7 @@
-form add_edit \
-cr_widget none \
-defaults [list title $project_name description $description mime_type "text/plain" context_id $parent_id parent_id $parent_id object_type pm_project] \
- -default_fields {project_code goal {planned_start_date $planned_start_date_sql} {planned_end_date $planned_end_date_sql} actual_start_date actual_end_date ongoing_p status_id customer_id} \
+ -default_fields {project_code goal {planned_start_date $planned_start_date_sql} {planned_end_date $planned_end_date_sql} actual_start_date actual_end_date ongoing_p status_id customer_id dform} \
-exclude_static]
set project_item_id [pm::project::get_project_item_id -project_id $project_id]
Index: openacs-4/packages/project-manager/www/task-add-edit-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-add-edit-one.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/project-manager/www/task-add-edit-one.tcl 4 Jun 2005 12:52:21 -0000 1.3
+++ openacs-4/packages/project-manager/www/task-add-edit-one.tcl 5 Jun 2005 00:11:05 -0000 1.4
@@ -132,6 +132,7 @@
task_id:key
{edit_p:text(hidden)}
+ {dform:text(hidden)}
{using_process_p:text(hidden)}
{return_url:text(hidden),optional}
{process_task_id:text(hidden),optional}
@@ -494,7 +495,7 @@
-form task_add_edit \
-cr_widget none \
-defaults [list title $task_title description $description mime_type $description_mime_type context_id $project_item_id parent_id $project_item_id object_type pm_task] \
- -default_fields {percent_complete {end_date $end_date_sql} estimated_hours_work estimated_hours_work_min estimated_hours_work_max priority} \
+ -default_fields {percent_complete {end_date $end_date_sql} estimated_hours_work estimated_hours_work_min estimated_hours_work_max priority dform} \
-exclude_static]
set task_item_id [db_string get_item_id {}]
@@ -585,7 +586,7 @@
-form task_add_edit \
-cr_widget none \
-defaults [list title $task_title description $description mime_type $description_mime_type context_id $project_item_id parent_id $project_item_id object_type pm_task] \
- -default_fields {percent_complete {end_date $end_date_sql} estimated_hours_work estimated_hours_work_min estimated_hours_work_max priority} \
+ -default_fields {percent_complete {end_date $end_date_sql} estimated_hours_work estimated_hours_work_min estimated_hours_work_max priority dform} \
-exclude_static]
db_dml update_task {}
Index: openacs-4/packages/project-manager/www/task-add-edit-one.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-add-edit-one.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-add-edit-one.xql 26 May 2005 09:34:29 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-add-edit-one.xql 5 Jun 2005 00:11:05 -0000 1.2
@@ -15,7 +15,7 @@
select title as task_title, description, mime_type as description_mime_type,
percent_complete, to_char(end_date,'YYYY-MM-DD') as task_end_date,
estimated_hours_work, estimated_hours_work_min,
- estimated_hours_work_max, priority
+ estimated_hours_work_max, priority, dform
from pm_tasks_revisionsi
where object_id = :task_id