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.4 -r1.13.2.5 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 26 Oct 2004 01:22:27 -0000 1.13.2.4 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 5 Jan 2005 16:08:14 -0000 1.13.2.5 @@ -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, process_instance_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, priority'); create or replace function pm_task__new_task_item ( integer, -- project_id @@ -451,7 +451,8 @@ timestamptz, -- creation_date integer, -- creation_user varchar, -- creation_ip - integer -- package_id + integer, -- package_id + integer -- priority ) returns integer as ' declare @@ -470,6 +471,7 @@ p_creation_user alias for $13; p_creation_ip alias for $14; p_package_id alias for $15; + p_priority alias for $16; v_item_id cr_items.item_id%TYPE; v_revision_id cr_revisions.revision_id%TYPE; @@ -522,9 +524,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) + task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, priority) 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''); + 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); PERFORM acs_permission__grant_permission( v_revision_id, @@ -536,7 +538,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'); +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'); create or replace function pm_task__new_task_revision ( integer, -- task_id (the item_id) @@ -554,7 +556,8 @@ timestamptz, -- creation_date integer, -- creation_user varchar, -- creation_ip - integer -- package_id + integer, -- package_id + integer -- priority ) returns integer as ' declare @@ -574,6 +577,7 @@ p_creation_user alias for $14; p_creation_ip alias for $15; p_package_id alias for $16; + p_priority alias for $17; v_revision_id cr_revisions.revision_id%TYPE; v_id cr_items.item_id%TYPE; begin @@ -599,9 +603,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) + task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, priority) 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); + 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); update pm_tasks set status = p_status_id where task_id = p_task_id; Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-table-create.sql,v diff -u -r1.19.2.7 -r1.19.2.8 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 14 Nov 2004 14:50:15 -0000 1.19.2.7 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 5 Jan 2005 16:08:14 -0000 1.19.2.8 @@ -400,7 +400,9 @@ earliest_start timestamptz, earliest_finish timestamptz, latest_start timestamptz, - latest_finish timestamptz + latest_finish timestamptz, + -- How important is this task + priority integer default 0 ); -- create the content type Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/upgrade/upgrade-2.60b1-2.61d1.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs-postgresql.xql,v diff -u -r1.4.2.7 -r1.4.2.8 --- openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 5 Nov 2004 21:08:06 -0000 1.4.2.7 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 5 Jan 2005 16:08:14 -0000 1.4.2.8 @@ -191,8 +191,9 @@ :status_id, current_timestamp, :update_user, - :update_ip, - :package_id) + :update_ip, + :package_id, + :priority) @@ -230,7 +231,8 @@ coalesce (:creation_date,current_timestamp), :creation_user, :creation_ip, - :package_id) + :package_id, + :priority) @@ -316,7 +318,8 @@ to_char(t.end_date, 'YYYY') as end_date_year, d.parent_task_id, i.item_id as tid, - t.parent_id as project + t.parent_id as project, + t.priority FROM pm_tasks_revisionsx t, cr_items i Index: openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/task-procs.tcl,v diff -u -r1.4.2.36 -r1.4.2.37 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 20 Dec 2004 19:47:39 -0000 1.4.2.36 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 5 Jan 2005 16:08:14 -0000 1.4.2.37 @@ -627,6 +627,7 @@ -update_user:required -update_ip:required -package_id:required + {-priority "0"} } { @@ -715,6 +716,7 @@ -creation_user:required -creation_ip:required -package_id:required + {-priority "0"} } { Creates a new task. @@ -1959,6 +1961,7 @@ {-end_date_year_array:required} {-project_item_id_array:required} {-set_client_properties_p "f"} + {-priority_array:required} } { Stuff information about tasks into several arrays @@ -1989,6 +1992,7 @@ upvar 1 $end_date_month_array end_date_month_arr upvar 1 $end_date_year_array end_date_year_arr upvar 1 $project_item_id_array project_item_id_arr + upvar 1 $priority_array priority_arr set task_where_clause " and i.item_id in ([join $tasks_item_id ", "])" @@ -2005,6 +2009,7 @@ set end_date_month_arr($tid) $end_date_month set end_date_year_arr($tid) $end_date_year set project_item_id_arr($tid) $project + set priority_arr($tid) $priority # make sure that we don't have empty values for estimated # hours work @@ -2272,7 +2277,8 @@ -end_date_day_array end_date_day_array \ -end_date_month_array end_date_month_array \ -end_date_year_array end_date_year_array \ - -project_item_id_array project_item_id_array + -project_item_id_array project_item_id_array \ + -priority_array priority_array foreach num $number { @@ -2301,6 +2307,7 @@ } + set old_end_date_day [ad_get_client_property -- project-manager old_end_date_day($tid)] set old_end_date_month [ad_get_client_property -- project-manager old_end_date_month($tid)] set old_end_date_year [ad_get_client_property -- project-manager old_end_date_year($tid)] Index: openacs-4/contrib/packages/project-manager/www/one-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one-postgresql.xql,v diff -u -r1.23.2.7 -r1.23.2.8 --- openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 9 Dec 2004 16:53:44 -0000 1.23.2.7 +++ openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 5 Jan 2005 16:08:14 -0000 1.23.2.8 @@ -65,7 +65,8 @@ t.actual_hours_worked, s.status_type, s.description as status_description, - r.is_lead_p + r.is_lead_p, + t.priority FROM (select tr.item_id, ta.party_id, @@ -82,7 +83,8 @@ tr.estimated_hours_work_max, tr.actual_hours_worked, tr.parent_id, - tr.revision_id + tr.revision_id, + tr.priority from pm_tasks_revisionsx tr LEFT JOIN pm_task_assignment ta ON tr.item_id = ta.task_id) t Index: openacs-4/contrib/packages/project-manager/www/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.tcl,v diff -u -r1.30.2.16 -r1.30.2.17 --- openacs-4/contrib/packages/project-manager/www/one.tcl 20 Dec 2004 19:48:30 -0000 1.30.2.16 +++ openacs-4/contrib/packages/project-manager/www/one.tcl 5 Jan 2005 16:08:14 -0000 1.30.2.17 @@ -274,6 +274,12 @@ @tasks.parent_task_id@ } } + priority { + label "Priority" + display_template { + @tasks.priority@ + } + } slack_time { label "Slack" display_template " @@ -350,6 +356,11 @@ orderby_desc "title desc, task_item_id desc" default_direction asc } + priority { + orderby_asc "priority, earliest_start, task_item_id asc, u.first_names, u.last_name" + orderby_desc "priority desc, earliest_start desc, task_item_id desc, u.first_names, u.last_name" + default_direction desc + } earliest_start { orderby_asc "earliest_start, task_item_id asc, u.first_names, u.last_name" orderby_desc "earliest_start desc, task_item_id desc, u.first_names, u.last_name" Index: openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit-2.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl 21 Dec 2004 15:00:33 -0000 1.1.2.7 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit-2.tcl 5 Jan 2005 16:08:14 -0000 1.1.2.8 @@ -45,6 +45,7 @@ {log:array ""} {logger_variable:array ""} {date:multiple ""} + {priority:array ""} } -properties { } -validate { } -errors { @@ -142,8 +143,8 @@ -end_date_month_array old_end_date_month \ -end_date_year_array old_end_date_year \ -project_item_id_array old_project_item_id \ + -priority_array old_priority \ -set_client_properties_p t - foreach num $number { # -------------------------- @@ -204,9 +205,9 @@ -update_user $user_id \ -update_ip $peeraddr \ -package_id $package_id \ + -priority $priority($num) ] - # -------------------------- # remove all old assignments # -------------------------- @@ -306,6 +307,7 @@ -creation_user $user_id \ -creation_ip $peeraddr \ -package_id $package_id \ + -priority $priority($num) ] set task_item_id($num) $task_item Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.adp,v diff -u -r1.12.2.10 -r1.12.2.11 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 16 Dec 2004 16:22:53 -0000 1.12.2.10 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 5 Jan 2005 16:08:14 -0000 1.12.2.11 @@ -176,8 +176,21 @@
+ Priority: + +