Index: openacs-4/contrib/packages/project-manager/project-manager.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/Attic/project-manager.info,v
diff -u -r1.12.2.2 -r1.12.2.3
--- openacs-4/contrib/packages/project-manager/project-manager.info 6 Dec 2003 16:30:28 -0000 1.12.2.2
+++ openacs-4/contrib/packages/project-manager/project-manager.info 13 Dec 2003 01:19:54 -0000 1.12.2.3
@@ -26,6 +26,7 @@
+
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-custom-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-custom-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-drop.sql,v
diff -u -r1.10.2.2 -r1.10.2.3
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql 5 Dec 2003 01:09:19 -0000 1.10.2.2
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql 13 Dec 2003 01:19:54 -0000 1.10.2.3
@@ -10,6 +10,8 @@
-- TASKS
--------
+\i project-manager-custom-drop.sql
+
-- task dependency types
drop table pm_task_dependency_types cascade;
drop table pm_task_dependency cascade;
@@ -143,11 +145,6 @@
drop sequence pm_project_status_seq;
drop table pm_project_status;
-drop table pm_project_category_map;
-
-drop sequence pm_project_category_seq;
-drop table pm_project_category;
-
select content_type__drop_type('pm_task', 't', 'f');
drop table pm_tasks cascade;
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.2 -r1.8.2.3
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 5 Dec 2003 01:09:19 -0000 1.8.2.2
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 13 Dec 2003 01:19:54 -0000 1.8.2.3
@@ -260,9 +260,6 @@
begin
raise NOTICE ''Deleting pm_project...'';
- delete from acs_permissions
- where object_id = p_project_id;
-
for v_child in select
item_id
from
@@ -602,11 +599,6 @@
declare
p_task_id alias for $1;
begin
- -- will not work because permissions are on revision_id not
- -- item_id
- -- delete from acs_permissions
- -- where object_id = p_task_id;
-
delete from pm_tasks_revisions
where task_revision_id in (select revision_id from pm_tasks_revisionsx where item_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.15.2.2 -r1.15.2.3
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 5 Dec 2003 01:09:19 -0000 1.15.2.2
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 13 Dec 2003 01:19:54 -0000 1.15.2.3
@@ -532,3 +532,5 @@
Maps who is assigned to process tasks. These will be the default people
assigned to the new tasks
';
+
+\i project-manager-custom-create.sql
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/www/add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit.tcl,v
diff -u -r1.12.2.2 -r1.12.2.3
--- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 5 Dec 2003 01:09:19 -0000 1.12.2.2
+++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 13 Dec 2003 01:19:54 -0000 1.12.2.3
@@ -43,7 +43,9 @@
set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"]
set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"]
+set use_project_customizations_p [parameter::get -parameter "UseProjectCustomizationsP" -default "0"]
+
if {[exists_and_not_null project_id]} {
set title "Edit a $project_term_lower"
set context_bar [ad_context_bar "Edit $project_term"]
@@ -161,10 +163,15 @@
} -new_data {
set project_id [db_exec_plsql new_project_item { *SQL* }]
set project_item_id [db_string get_item_id { }]
-
- ad_returnredirect "one?[export_url_vars project_item_id project_id]"
- ad_script_abort
-
+
+ if {$use_project_customizations_p} {
+ ad_returnredirect "add-edit-2?[export_url_vars project_item_id project_id]"
+ ad_script_abort
+ } else {
+ ad_returnredirect "one?[export_url_vars project_item_id project_id]"
+ ad_script_abort
+ }
+
} -edit_data {
set project_id [db_exec_plsql new_project_revision { *SQL* }]
@@ -174,6 +181,11 @@
} -after_submit {
- ad_returnredirect "one?[export_url_vars project_id]"
- ad_script_abort
+ if {$use_project_customizations_p} {
+ ad_returnredirect "add-edit-2?[export_url_vars project_id]"
+ ad_script_abort
+ } else {
+ ad_returnredirect "one?[export_url_vars project_id]"
+ ad_script_abort
+ }
}
Index: openacs-4/contrib/packages/project-manager/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index-postgresql.xql,v
diff -u -r1.8.2.2 -r1.8.2.3
--- openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 5 Dec 2003 01:09:19 -0000 1.8.2.2
+++ openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 13 Dec 2003 01:19:54 -0000 1.8.2.3
@@ -23,7 +23,6 @@
to_char(p.latest_finish_date, 'MM/DD/YY') as latest_finish_date
FROM pm_projectsx p LEFT JOIN (select om.category_id, om.object_id, t.name as category_name from category_object_map om, category_translations t where om.category_id = t.category_id) c ON p.item_id = c.object_id, cr_items i, pm_project_status s
WHERE p.project_id = i.live_revision and
- p.parent_id = :root_folder and
s.status_id = p.status_id
[template::list::filter_where_clauses -and -name projects]
[template::list::orderby_clause -orderby -name projects]
Index: openacs-4/contrib/packages/project-manager/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.adp,v
diff -u -r1.17.2.1 -r1.17.2.2
--- openacs-4/contrib/packages/project-manager/www/index.adp 4 Dec 2003 21:00:13 -0000 1.17.2.1
+++ openacs-4/contrib/packages/project-manager/www/index.adp 13 Dec 2003 01:19:54 -0000 1.17.2.2
@@ -11,6 +11,8 @@
+ @category_select;noquote@
+
|
Index: openacs-4/contrib/packages/project-manager/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.tcl,v
diff -u -r1.9.2.2 -r1.9.2.3
--- openacs-4/contrib/packages/project-manager/www/index.tcl 5 Dec 2003 01:09:19 -0000 1.9.2.2
+++ openacs-4/contrib/packages/project-manager/www/index.tcl 13 Dec 2003 01:19:54 -0000 1.9.2.3
@@ -17,7 +17,8 @@
} {
orderby_project:optional
status_id:optional
- category_id:optional
+ category_id:multiple,optional
+ {subprojects_p "f"}
} -properties {
context:onevalue
@@ -59,11 +60,49 @@
# Projects, using list-builder ---------------------------------
+# Categories are arranges into category trees.
+# Set up an array for each tree. The array contains the category for each tree
-set category_choices [db_list_of_lists gg "select t.name, t.category_id from category_tree_map tm, categories c, category_translations t where c.tree_id = tm.tree_id and c.category_id = t.category_id and tm.object_id = :package_id"]
+db_foreach get_choices "select t.name as cat_name, t.category_id as cat_id, tm.tree_id from category_tree_map tm, categories c, category_translations t where c.tree_id = tm.tree_id and c.category_id = t.category_id and tm.object_id = :package_id order by t.name" {
+ lappend category_choices($tree_id) [list $cat_name $cat_id]
+}
+# We want to set up a filter for each category tree.
+set export_vars [export_vars -form {status_id subprojects_p orderby}]
+set category_select ""
+
+foreach tree_list [db_list_of_lists get_category_trees "select tt.name as tree_name, tt.tree_id from category_tree_map tm, category_tree_translations tt where tm.object_id = :package_id and tm.tree_id = tt.tree_id"] {
+
+ set tree_name [lindex $tree_list 0]
+ set tree_id [lindex $tree_list 1]
+
+ if {![exists_and_not_null category_choices($tree_id)]} {
+ set category_choices($tree_id) [list]
+ }
+
+
+
+ append category_select ""
+}
+
+
template::list::create \
-name projects \
-multirow projects \
@@ -100,22 +139,22 @@
} \
-filters {
status_id {
- label "Status"
+ label "Status"
values {[db_list_of_lists get_status "select description, status_id from pm_project_status order by status_type desc, description"]}
- where_clause {
- s.status_id = :status_id
- }
+ where_clause {s.status_id = :status_id}
}
+ subprojects_p {
+ label Subprojects
+ values {{"No" "f"} {"Yes" "t"}}
+ where_clause {p.parent_id = :root_folder}
+ }
category_id {
- label "Category"
- values {$category_choices}
- where_clause {
- om.category_id = :category_id
- }
+ label Categories
+ where_clause {c.category_id = [join [value_if_exists category_id] ","]}
}
} \
-orderby {
- default_value category_id,asc
+ default_value project_name,asc
project_name {
label "Project name"
orderby_desc "upper(p.title) desc"
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.19.2.1 -r1.19.2.2
--- openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 4 Dec 2003 21:00:13 -0000 1.19.2.1
+++ openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 13 Dec 2003 01:19:54 -0000 1.19.2.2
@@ -147,4 +147,33 @@
+
+
+ SELECT
+ p.target_rollout,
+ p.bakery_id,
+ f.name as bakery_name,
+ p.customer_id,
+ c.name as customer_name,
+ p.brand_id,
+ b.name as brand_name,
+ p.product_type,
+ p.finished_weight,
+ p.distributor_id,
+ d.name as distributor_name,
+ p.region,
+ p.ibr_formula_p,
+ p.mix_ing_supplied_p,
+ p.pkg_supplied_p
+ FROM
+ pm_projectsx p
+ LEFT JOIN ibr_facility f ON p.bakery_id = f.ibr_facility_id
+ LEFT JOIN organizations c ON p.customer_id = c.organization_id
+ LEFT JOIN ibr_brand b ON p.brand_id = b.ibr_brand_id
+ LEFT JOIN organizations d ON p.distributor_id = d.organization_id
+ WHERE
+ p.project_id = :original_project_id
+
+
+
Index: openacs-4/contrib/packages/project-manager/www/one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.adp,v
diff -u -r1.27.2.2 -r1.27.2.3
--- openacs-4/contrib/packages/project-manager/www/one.adp 5 Dec 2003 01:09:19 -0000 1.27.2.2
+++ openacs-4/contrib/packages/project-manager/www/one.adp 13 Dec 2003 01:19:54 -0000 1.27.2.3
@@ -128,7 +128,26 @@
+
+
+
+ Project information |
+
+
+
+
+
+ |
+
+
+
Add subproject
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.26.2.2 -r1.26.2.3
--- openacs-4/contrib/packages/project-manager/www/one.tcl 5 Dec 2003 01:09:19 -0000 1.26.2.2
+++ openacs-4/contrib/packages/project-manager/www/one.tcl 13 Dec 2003 01:19:54 -0000 1.26.2.3
@@ -37,12 +37,14 @@
write_p:onevalue
create_p:onevalue
versions:multirow
+ custom:multirow
parent_task_id:onevalue
task_type:onevalue
project_id:onevalue
use_goal_p:onevalue
use_project_code_p:onevalue
use_uncertain_completion_times_P:onevalue
+ use_project_customizations_p:onevalue
} -validate {
project_item_id_exists {
if {![exists_and_not_null project_item_id]} {
@@ -56,6 +58,8 @@
}
}
+set original_project_id $project_id
+
# --------------------------------------------------------------- #
# the unique identifier for this package
@@ -68,6 +72,7 @@
set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"]
set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"]
set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"]
+set use_project_customizations_p [parameter::get -parameter "UseProjectCustomizationsP" -default "0"]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
@@ -109,6 +114,8 @@
set work_display_template "@tasks.estimated_hours_work@ h"
}
+set process_link "process-use?project_item_id=$project_item_id"
+
template::list::create \
-name tasks \
-multirow tasks \
@@ -167,7 +174,7 @@
}
} \
- -actions [list "Use process" [export_vars -base process-use {project_item_id}] "Use a process"] \
+ -actions [list "Use process" $process_link "Use a process" "Projects" "index" "View list of tasks" "Tasks" "tasks" "View tasks for all projects" "Processes" "processes" "View and use processes" "Admin" "admin/" "Administration pages"]\
-bulk_actions {
"Edit" "task-add-edit" "Edit tasks"
} \
@@ -344,7 +351,17 @@
}
+# -------------------------CUSTOMIZATIONS--------------------------
+# If there are customizations, put them in a multirow called custom
+# -----------------------------------------------------------------
-ad_return_template
+db_1row custom_query { } -column_array custom
+set custom(pretty_target_rollout) [lc_time_fmt $custom(target_rollout) "%x"]
+
+# end of customizations
+
+
+
+ad_return_template
# ------------------------- END OF FILE ------------------------- #
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.10 -r1.10.2.1
--- openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 10 Nov 2003 19:34:54 -0000 1.10
+++ openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 13 Dec 2003 01:19:54 -0000 1.10.2.1
@@ -20,9 +20,17 @@
@num.rownum@ |
-Subject:*
+ Subject:*
+
+ Error
+
+
- Description:
|
+ Description:
+
+ Error
+
+ |
@@ -34,21 +42,47 @@
Min: |
- hrs |
+ hrs
+
+
+ Error
+
+ |
+
|
schedule constrained by other @task_term_lower@ |
Max: |
- hrs |
+ hrs
+
+
+ Error
+
+
+ |
- hrs |
+
hrs
+
+
+ Error
+
+
+ |
+
|
- depends on another @task_term_lower@ |
+ depends on another @task_term_lower@
+ Error
+ |
+
+
+
+ You must enter a number here (make your best guess) |
+
@@ -59,9 +93,11 @@
+ Error
+
- You may optionally enter a hard deadline, otherwise it is computed
+ You may optionally enter a hard deadline
@@ -92,6 +128,8 @@
|
+<% ns_log Notice error: [export_vars formerror]%>
+
Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.tcl,v
diff -u -r1.23.2.2 -r1.23.2.3
--- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 5 Dec 2003 01:09:19 -0000 1.23.2.2
+++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 13 Dec 2003 01:19:54 -0000 1.23.2.3
@@ -1,10 +1,14 @@
-ns_log notice task add edit page
-set mypage [ns_getform]
-if {[string equal "" $mypage]} {
- ns_log notice no form was submitted on my page
-} else {
- ns_log notice the following form was submitted on my page
- ns_set print $mypage
+set debug 1
+
+if {[string equal $debug 1]} {
+ ns_log notice task add edit page
+ set mypage [ns_getform]
+ if {[string equal "" $mypage]} {
+ ns_log notice no form was submitted on my page
+ } else {
+ ns_log notice the following form was submitted on my page
+ ns_set print $mypage
+ }
}
ad_page_contract {
@@ -284,9 +288,9 @@
for {set i 1} {$i <= $number} {incr i} {
set task_title_arr($i) ""
set description_arr($i) ""
- set estimated_hours_arr($i) ""
- set estimated_hours_min_arr($i) ""
- set estimated_hours_max_arr($i) ""
+ set estimated_hours_arr($i) "0"
+ set estimated_hours_min_arr($i) "0"
+ set estimated_hours_max_arr($i) "0"
set use_dependency_arr($i) ""
set parent_arr($i) ""
set end_date_arr($i) ""
@@ -304,7 +308,7 @@
set estimated_hours_arr($i) $estimated_hours_work_v($ptask_id)
set estimated_hours_min_arr($i) $estimated_hours_work_min_v($ptask_id)
set estimated_hours_max_arr($i) $estimated_hours_work_max_v($ptask_id)
-
+
if {[exists_and_not_null dependency_v($ptask_id)]} {
set use_dependency_arr($i) [list checked ""]
} else {
@@ -376,7 +380,7 @@
{value {$description_arr($i)}} \
] \
[list \
- use_dependency_p.$i:text(checkbox) \
+ use_dependency_p.$i:text(checkbox),optional \
{label "Use dependency"} \
{options {{"" "on"}}} \
{html $use_dependency_arr($i)} \
Index: openacs-4/contrib/packages/project-manager/www/task-select-project.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-select-project.tcl,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/contrib/packages/project-manager/www/task-select-project.tcl 5 Dec 2003 01:09:19 -0000 1.1.2.2
+++ openacs-4/contrib/packages/project-manager/www/task-select-project.tcl 13 Dec 2003 01:19:54 -0000 1.1.2.3
@@ -41,8 +41,12 @@
set title "Edit a $task_term_lower"
-set context_bar [ad_context_bar [list "processes" "Processes"] "Use"]
+if {[exists_and_not_null process_id]} {
+ set context_bar [ad_context_bar [list "processes" "Processes"] "Use"]
+} else {
+ set context_bar [ad_context_bar [list "tasks" "Tasks"] "Select Project"]
+}
# need to change this to show all the projects you're on by
# default, and then give you the option of selecting all projects
Index: openacs-4/contrib/packages/project-manager/www/tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.adp,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/contrib/packages/project-manager/www/tasks.adp 5 Dec 2003 01:09:19 -0000 1.1.2.2
+++ openacs-4/contrib/packages/project-manager/www/tasks.adp 13 Dec 2003 01:19:54 -0000 1.1.2.3
@@ -11,6 +11,11 @@
+
+
|
Index: openacs-4/contrib/packages/project-manager/www/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.tcl,v
diff -u -r1.1.2.2 -r1.1.2.3
--- openacs-4/contrib/packages/project-manager/www/tasks.tcl 5 Dec 2003 01:09:19 -0000 1.1.2.2
+++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 13 Dec 2003 01:19:54 -0000 1.1.2.3
@@ -17,6 +17,7 @@
} {
orderby:optional
party_id:optional
+ {searchterm ""}
} -properties {
task_term:onevalue
context_bar:onevalue
@@ -39,9 +40,9 @@
set user_id [ad_maybe_redirect_for_registration]
# by default, show this user's tasks
-if {![exists_and_not_null party_id]} {
- set party_id $user_id
-}
+#if {![exists_and_not_null party_id]} {
+# set party_id $user_id
+#}
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
@@ -83,13 +84,19 @@
-actions {
"Projects" "index" "View list of tasks"
"Processes" "processes" "View and use processes"
- "Add task" "task-add-edit" "Add a task"
+ "Add task" "task-select-project" "Add a task"
"Admin" "admin/" "Administration pages"
} \
-main_class {
narrow
} \
-filters {
+ searchterm {
+ label "Search"
+ where_clause {
+ t.title ilike '%:searchterm%'
+ }
+ }
party_id {
label "People"
values {[db_list_of_lists get_people "select first_names || ' ' || last_name, u.party_id from all_users u, pm_task_assignment a where u.party_id = a.party_id order by upper(first_names), upper(last_name)"]}