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.1 -r1.2
--- openacs-4/packages/project-manager/project-manager.info 29 Apr 2005 17:43:36 -0000 1.1
+++ openacs-4/packages/project-manager/project-manager.info 30 Apr 2005 06:59:23 -0000 1.2
@@ -7,20 +7,21 @@
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/catalog/project-manager.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 29 Apr 2005 17:43:36 -0000 1.1
+++ openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 30 Apr 2005 06:59:32 -0000 1.2
@@ -1,5 +1,5 @@
-
+
Action
Actions
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.1 -r1.2
--- openacs-4/packages/project-manager/tcl/task-procs.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/tcl/task-procs.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -799,8 +799,12 @@
ad_proc -public pm::task::get_url {
object_id
} {
- set url [pm::util::url]
+
+ set package_id [db_string pm_package_id "select package_id from cr_folders cf, cr_items ci1, cr_items ci2 where cf.folder_id = ci1.parent_id and ci1.item_id = ci2.parent_id and ci2.item_id = :object_id"]
+ set url "[ad_url]"
+ append url [site_node::get_url_from_object_id -object_id $package_id]
+
set package_url "${url}task-one?task_id=$object_id"
return $package_url
Index: openacs-4/packages/project-manager/www/add-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/add-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/add-edit-2.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/add-edit-2.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -39,7 +39,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
set subsite_id [ad_conn subsite_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set user_group_id [application_group::group_id_from_package_id \
-package_id $subsite_id]
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.1 -r1.2
--- openacs-4/packages/project-manager/www/add-edit.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/add-edit.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -36,7 +36,7 @@
# --------------------------------------------------------------- #
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# terminology
set project_term [parameter::get -parameter "ProjectName" -default "Project"]
Index: openacs-4/packages/project-manager/www/calendar-users-update.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/calendar-users-update.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/calendar-users-update.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/calendar-users-update.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -15,9 +15,9 @@
} -errors {
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
-if {[empty_string_p $party_id]} {
+if {[empty_string_p party_id]} {
set party_id [list $user_id]
}
Index: openacs-4/packages/project-manager/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/index.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/index.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -52,7 +52,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/log-bulk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/log-bulk.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/log-bulk.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/log-bulk.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -19,7 +19,7 @@
}
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set title "Log time for multiple tasks"
Index: openacs-4/packages/project-manager/www/one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/one.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/one.adp 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/one.adp 30 Apr 2005 06:59:33 -0000 1.2
@@ -7,6 +7,7 @@
@my_title;noquote@
@context;noquote@
+ @project_item_id@
(not current, select live version from the task change page)
Index: openacs-4/packages/project-manager/www/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/one.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/one.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/one.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -94,7 +94,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
set package_url [ad_conn package_url]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# terminology and other parameters
Index: openacs-4/packages/project-manager/www/process-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-add-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-add-edit.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-add-edit.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -27,7 +27,7 @@
# --------------------------------------------------------------- #
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# terminology and parameters
set project_term [parameter::get -parameter "ProjectName" -default "Project"]
Index: openacs-4/packages/project-manager/www/process-dependency-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-dependency-add-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-dependency-add-edit.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-dependency-add-edit.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -69,7 +69,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
Index: openacs-4/packages/project-manager/www/process-instance-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-instance-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-instance-edit-2.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-instance-edit-2.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -17,7 +17,7 @@
} -errors {
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
permission::require_permission \
Index: openacs-4/packages/project-manager/www/process-instances.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-instances.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-instances.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-instances.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -23,7 +23,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/process-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-one.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-one.tcl 29 Apr 2005 17:43:37 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-one.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -30,7 +30,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/process-task-add-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-task-add-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-task-add-edit-2.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-task-add-edit-2.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -81,7 +81,7 @@
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
permission::require_permission -party_id $user_id -object_id $package_id -privilege create
Index: openacs-4/packages/project-manager/www/process-task-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-task-add-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-task-add-edit.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-task-add-edit.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -60,7 +60,7 @@
# --------------------------------------
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# ------------------------------------------------------------
# if process_task_id is set, then we are editing process tasks
Index: openacs-4/packages/project-manager/www/process-task-delete-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-task-delete-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-task-delete-2.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-task-delete-2.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -14,7 +14,7 @@
# --------------------------------------------------------------- #
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege write
Index: openacs-4/packages/project-manager/www/process-task-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-task-delete.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-task-delete.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-task-delete.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -27,7 +27,7 @@
# --------------------------------------------------------------- #
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# terminology
set task_term_lower [parameter::get -parameter "taskname" -default "task"]
Index: openacs-4/packages/project-manager/www/process-use.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/process-use.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/process-use.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/process-use.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -30,7 +30,7 @@
# --------------------------------------------------------------- #
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
# terminology
Index: openacs-4/packages/project-manager/www/processes.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/processes.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/processes.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/processes.tcl 30 Apr 2005 06:59:33 -0000 1.2
@@ -40,7 +40,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/project-assign-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/project-assign-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/project-assign-edit-2.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/project-assign-edit-2.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -17,7 +17,7 @@
} -errors {
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# remove assignments
set current_assignees [pm::project::assign_remove_everyone \
Index: openacs-4/packages/project-manager/www/project-assign-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/project-assign-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/project-assign-edit.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/project-assign-edit.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -20,7 +20,7 @@
set package_id [ad_conn package_id]
# The id of the person logged in and browsing this page
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set subsite_id [ad_conn subsite_id]
Index: openacs-4/packages/project-manager/www/task-add-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-add-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-add-edit-2.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-add-edit-2.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -54,7 +54,7 @@
# ---------------------------------------------------------------
# Set up
# ---------------------------------------------------------------
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
set peeraddr [ad_conn peeraddr]
Index: openacs-4/packages/project-manager/www/task-add-edit-3.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-add-edit-3.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-add-edit-3.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-add-edit-3.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -53,7 +53,7 @@
# ---------------------------------------------------------------
# Set up
# ---------------------------------------------------------------
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
set peeraddr [ad_conn peeraddr]
Index: openacs-4/packages/project-manager/www/task-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-add-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-add-edit.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-add-edit.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -39,7 +39,7 @@
# ---------------------------------------------------------------
# Set up
# ---------------------------------------------------------------
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
# use hour units or day units
Index: openacs-4/packages/project-manager/www/task-calendar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-calendar.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-calendar.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-calendar.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -20,7 +20,7 @@
roles:multirow
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set date [calendar::adjust_date -date $date -julian_date $julian_date]
Index: openacs-4/packages/project-manager/www/task-link.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-link.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-link.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-link.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -17,7 +17,7 @@
} -errors {
}
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
permission::require_permission \
Index: openacs-4/packages/project-manager/www/task-one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-one.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-one.adp 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-one.adp 30 Apr 2005 06:59:34 -0000 1.2
@@ -3,11 +3,12 @@
@task_term@ #@task_id@:
@task_info.task_title;noquote@ @closed_message@
@context;noquote@
+ @project_item_id@
(not current, select live version from the task change page)
-
+
Index: openacs-4/packages/project-manager/www/task-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-one.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-one.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-one.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -92,7 +92,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
set package_url [ad_conn package_url]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
Index: openacs-4/packages/project-manager/www/task-print.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-print.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-print.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-print.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -74,7 +74,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[ad_conn url]?task_id=$task_id"]
Index: openacs-4/packages/project-manager/www/task-select-project.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-select-project.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/task-select-project.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/task-select-project.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -34,7 +34,7 @@
# --------------------------------------------------------------- #
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
set package_id [ad_conn package_id]
permission::require_permission -object_id $package_id -privilege write
Index: openacs-4/packages/project-manager/www/tasks-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/tasks-postgresql.xql 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/tasks-postgresql.xql 30 Apr 2005 06:59:34 -0000 1.2
@@ -5,11 +5,12 @@
SELECT
- ts.task_id as task_item_id,
+ ts.task_id,
ts.task_number,
t.task_revision_id,
t.title,
- t.description,
+ t.description,
+ tst.description as status,
t.parent_id as project_item_id,
proj_rev.logger_project,
proj_rev.title as project_name,
@@ -32,6 +33,7 @@
r.one_line as role
FROM
pm_tasks_active ts,
+ pm_task_status tst,
cr_items i,
pm_tasks_revisionsx t
LEFT JOIN pm_task_assignment ta
@@ -45,15 +47,48 @@
pm_projectsx proj_rev
WHERE
ts.task_id = t.item_id and
+ tst.status_id = status and
i.item_id = t.item_id and
t.task_revision_id = i.live_revision and
t.parent_id = proj.item_id and
proj.live_revision = proj_rev.revision_id
and proj.parent_id = f.folder_id
and f.package_id = :package_id
+ [template::list::page_where_clause -and -name "tasks" -key "ts.task_id"]
[template::list::filter_where_clauses -and -name tasks]
[template::list::orderby_clause -orderby -name tasks]
+
+
+ select distinct task_id from (
+ SELECT
+ ts.task_id
+ FROM
+ pm_tasks_active ts,
+ cr_items i,
+ pm_tasks_revisionsx t
+ LEFT JOIN pm_task_assignment ta
+ ON t.item_id = ta.task_id
+ LEFT JOIN persons p
+ ON ta.party_id = p.person_id
+ LEFT JOIN pm_roles r
+ ON ta.role_id = r.role_id,
+ cr_items proj,
+ cr_folders f,
+ pm_projectsx proj_rev
+ WHERE
+ ts.task_id = t.item_id and
+ i.item_id = t.item_id and
+ t.task_revision_id = i.live_revision and
+ t.parent_id = proj.item_id and
+ proj.live_revision = proj_rev.revision_id
+ and proj.parent_id = f.folder_id
+ and f.package_id = :package_id
+ [template::list::filter_where_clauses -and -name tasks]
+ [template::list::orderby_clause -orderby -name tasks]) as tasks
+
+
+
Index: openacs-4/packages/project-manager/www/tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/tasks.adp 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/tasks.adp 30 Apr 2005 06:59:34 -0000 1.2
@@ -4,8 +4,9 @@
@task_term@s
@context@
-
-
+
+ @passed_project_item_id@
+
Index: openacs-4/packages/project-manager/www/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/tasks.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/tasks.tcl 29 Apr 2005 17:43:38 -0000 1.1
+++ openacs-4/packages/project-manager/www/tasks.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -3,6 +3,7 @@
Main view page for tasks.
@author jader@bread.com
+ @author openacs@sussdorff.de (MS)
@creation-date 2003-12-03
@cvs-id $Id$
@@ -23,14 +24,18 @@
{searchterm ""}
{mine_p "t"}
{status_id ""}
+ {page ""}
+ {page_size 25}
role_id:optional
+ project_item_id:optional
} -properties {
task_term:onevalue
context:onevalue
tasks:multirow
hidden_vars:onevalue
}
+
# if someone clicks on a party, then we want to see those tasks.
if {[exists_and_not_null party_id]} {
set mine_p "f"
@@ -46,6 +51,13 @@
set use_days_p [parameter::get -parameter "UseDayInsteadOfHour" -default "t"]
+# Check if a project_item_id was passed in and store it
+if [exists_and_not_null project_item_id] {
+ set passed_project_item_id $project_item_id
+} else {
+ set passed_project_item_id 0
+}
+
set exporting_vars { status_id party_id orderby mine_p }
set hidden_vars [export_vars -form $exporting_vars]
# how to get back here
@@ -55,9 +67,12 @@
# set up context bar
set context [list "Tasks"]
+# Get the currently available Status
+set status_list [db_list_of_lists get_status_values "select description, status_id from pm_task_status order by status_type desc, description"]
+
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# if mine_p is true, show only my tasks
if {[string equal $mine_p t]} {
@@ -66,7 +81,10 @@
# status defaults to open
if {![exists_and_not_null status_id]} {
- set status_id [pm::task::default_status_open]
+ set status_where_clause ""
+# set status_id [pm::task::default_status_open]
+} else {
+ set status_where_clause {ts.status = :status_id}
}
# permissions
@@ -106,11 +124,11 @@
set elements {
- task_number {
+ task_id {
label "\#"
link_url_col item_url
link_html { title "View this project version" }
- display_template {@tasks.task_item_id@}
+ display_template {@tasks.task_id@}
}
title {
label "Subject"
@@ -122,30 +140,73 @@
role {
label "Role"
}
- latest_start_pretty {
- label "Latest Start"
- }
- latest_finish_pretty {
- label "Latest Finish"
- display_template {
- @tasks.latest_finish_pretty@
- }
- }
}
+# MS: This assumes that the status of "2" will always be closed.
+# It does not make sense to display the latest_start and finished times for already
+# Closed tasks
+
+if {$status_id != 2} {
+ append elements {
+ latest_start_pretty {
+ label "Latest Start"
+ }
+ latest_finish_pretty {
+ label "Latest Finish"
+ display_template {
+ @tasks.latest_finish_pretty@
+ }
+ }
+ }
+}
+
+append elements {
+ status {
+ label "Status"
+ }
+}
+
+# MS: This assumes that the status of "2" will always be closed.
+# It does not make sense to display the remaining hours for
+# Closed tasks
+
+if {$status_id != 2} {
+
+ if {[string is true $use_days_p]} {
+ append elements {
+ days_remaining {
+ label "Days work"
+ html {
+ align right
+ }
+ }
+ }
+ } else {
+ append elements {
+ hours_remaining {
+ label "Hours remaining"
+ html {
+ align right
+ }
+ }
+ }
+ }
+
+}
+
if {[string is true $use_days_p]} {
append elements {
- days_remaining {
- label "Days work"
+ actual_days_worked {
+ label "Days worked"
html {
align right
}
}
}
} else {
append elements {
- hours_remaining {
- label "Hours remaining"
+ actual_hours_worked {
+ label "Hours worked"
html {
align right
}
@@ -158,20 +219,21 @@
label "Project"
display_col project_name
link_url_eval {[export_vars -base one {project_item_id $tasks(project_item_id)}]}
+ hide_p {[ad_decode [exists_and_not_null project_item_id] 1 1 0]}
}
log_url {
label "Log"
display_template {L}
}
percent_complete {
- display_template ""
+ display_template ""
}
}
template::list::create \
-name tasks \
-multirow tasks \
- -key task_item_id \
+ -key task_id \
-elements $elements \
-actions [list "Add task" [export_vars -base task-select-project {return_url}] "Add a task"] \
-bulk_actions {
@@ -189,35 +251,43 @@
label "Search"
where_clause {$search_term_where}
}
+ status_id {
+ label "Status"
+ values {$status_list}
+ where_clause "$status_where_clause"
+ }
+ project_item_id {
+ label "Project"
+ values {[pm::project::get_list_of_open]}
+ where_clause {
+ t.parent_id = :project_item_id
+ }
+ }
role_id {
label "Roles"
values {[pm::role::select_list_filter]}
where_clause {
ta.role_id = :role_id
}
}
+
party_id {
label "People"
values {[pm::task::assignee_filter_select -status_id $status_id]}
where_clause {
ta.party_id = :party_id
}
}
- status_id {
- label "Status"
- values {[db_list_of_lists get_status_values "select description, status_id from pm_task_status order by status_type desc, description"]}
- where_clause {ts.status = :status_id}
- }
mine_p {
label "Show others' tasks"
}
} \
-orderby {
default_value $default_orderby
- task_number {
+ task_id {
label "Task \#"
- orderby_desc "ts.task_number desc, p.first_names, p.last_name"
- orderby_asc "ts.task_number asc, p.first_names, p.last_name"
+ orderby_desc "ts.task_id desc, p.first_names, p.last_name"
+ orderby_asc "ts.task_id asc, p.first_names, p.last_name"
default_direction asc
}
title {
@@ -256,20 +326,27 @@
orderby_asc "t.latest_finish, ts.task_id, p.first_names, p.last_name"
default_direction asc
}
+ status {
+ label "Status"
+ orderby_desc "status desc, t.latest_finish desc, ts.task_id, p.first_names, p.last_name"
+ orderby_asc "status asc, t.latest_finish desc, ts.task_id, p.first_names, p.last_name"
+ default_direction asc
+ }
} \
+ -page_size_variable_p 1 \
+ -page_size $page_size \
+ -page_flush_p 0 \
+ -page_query_name tasks_pagination \
-orderby_name orderby \
-html {
width 100%
}
-
-
-
db_multirow -extend { item_url latest_start_pretty latest_finish_pretty slack_time log_url hours_remaining days_remaining} tasks tasks {
} {
- set item_url [export_vars -base "task-one" {{task_id $task_item_id}}]
+ set item_url [export_vars -base "task-one" {{task_id $task_id}}]
- set log_url [export_vars -base "${logger_url}log" {{project_id $logger_project} {pm_task_id $task_item_id} {pm_project_id $project_item_id} {return_url $return_url}}]
+ set log_url [export_vars -base "${logger_url}log" {{project_id $logger_project} {pm_task_id $task_id} {pm_project_id $project_item_id} {return_url $return_url}}]
set latest_start_pretty [lc_time_fmt $latest_start "%x"]
set latest_finish_pretty [lc_time_fmt $latest_finish "%x"]
@@ -297,6 +374,8 @@
-estimated_hours_work_max $estimated_hours_work_max \
-percent_complete $percent_complete]
+ set actual_days_worked [expr $actual_hours_worked / 24]
+
}
Index: openacs-4/packages/project-manager/www/admin/default-project-roles.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/admin/default-project-roles.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/admin/default-project-roles.tcl 29 Apr 2005 17:43:39 -0000 1.1
+++ openacs-4/packages/project-manager/www/admin/default-project-roles.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -41,7 +41,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/admin/index.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/admin/index.tcl 29 Apr 2005 17:43:39 -0000 1.1
+++ openacs-4/packages/project-manager/www/admin/index.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -42,7 +42,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# set up links
set categories_link "/categories/cadmin/one-object?object_id=$package_id"
Index: openacs-4/packages/project-manager/www/admin/roles.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/admin/roles.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/admin/roles.tcl 29 Apr 2005 17:43:39 -0000 1.1
+++ openacs-4/packages/project-manager/www/admin/roles.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -41,7 +41,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/admin/workgroups.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/admin/workgroups.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/admin/workgroups.tcl 29 Apr 2005 17:43:39 -0000 1.1
+++ openacs-4/packages/project-manager/www/admin/workgroups.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -41,7 +41,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
-set user_id [auth::require_login]
+set user_id [ad_maybe_redirect_for_registration]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/packages/project-manager/www/comments/add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/comments/add.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/comments/add.tcl 29 Apr 2005 17:43:39 -0000 1.1
+++ openacs-4/packages/project-manager/www/comments/add.tcl 30 Apr 2005 06:59:34 -0000 1.2
@@ -13,6 +13,7 @@
title:notnull
return_url:notnull
{type "task"}
+ {attach_p "f"}
{description:html ""}
} -properties {
} -validate {
@@ -53,6 +54,12 @@
{options {{"Yes" "t"} {"No" "f"}}}
}
+ {attach_p:text(select),optional
+ {label "Attach a file?"}
+ {options {{"Yes" "t"} {"No" "f"}}}
+ {value "f"}
+ }
+
} -new_request {
set description [template::util::richtext::create "" {}]
@@ -63,16 +70,21 @@
set description_body [template::util::richtext::get_property contents $description]
set description_format [template::util::richtext::get_property format $description]
- pm::util::general_comment_add \
- -object_id $object_id \
- -title "$title" \
- -comment "$description_body" \
- -mime_type "$description_format" \
- -send_email_p $send_email_p \
- -type $type
+ set comment_id [pm::util::general_comment_add \
+ -object_id $object_id \
+ -title "$title" \
+ -comment "$description_body" \
+ -mime_type "$description_format" \
+ -send_email_p $send_email_p \
+ -type $type]
# does not seem to be working for some reason
util_user_message -message "Comment: [ad_quotehtml $title] saved"
- ad_returnredirect $return_url
+
+ if { [string equal $attach_p "f"] && ![empty_string_p $return_url] } {
+ ad_returnredirect $return_url
+ } else {
+ ad_returnredirect "/comments/view-comment?[export_vars { comment_id return_url }]"
+ }
}
Index: openacs-4/packages/project-manager/www/lib/master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/master.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/lib/master.adp 29 Apr 2005 17:43:40 -0000 1.1
+++ openacs-4/packages/project-manager/www/lib/master.adp 30 Apr 2005 06:59:35 -0000 1.2
@@ -18,11 +18,12 @@
@import url(@package_url@style.css) all;
-
+
-
+
+
Index: openacs-4/packages/project-manager/www/lib/master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/master.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/lib/master.tcl 29 Apr 2005 17:43:40 -0000 1.1
+++ openacs-4/packages/project-manager/www/lib/master.tcl 30 Apr 2005 06:59:35 -0000 1.2
@@ -3,3 +3,5 @@
set package_url [ad_conn package_url]
if { ![info exists header_stuff] } { set header_stuff {} }
+
+if { ![info exists project_item_id] } { set project_item_id "" }
\ No newline at end of file
Index: openacs-4/packages/project-manager/www/lib/nav-bar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/nav-bar.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/www/lib/nav-bar.tcl 29 Apr 2005 17:43:40 -0000 1.1
+++ openacs-4/packages/project-manager/www/lib/nav-bar.tcl 30 Apr 2005 06:59:35 -0000 1.2
@@ -20,7 +20,12 @@
if { [ad_conn user_id] != 0} {
- lappend link_list [list "${package_url}tasks"]
+ if { [empty_string_p $project_item_id] } {
+ lappend link_list [list "${package_url}tasks"]
+ } else {
+ lappend link_list [list [export_vars -base "${package_url}tasks" {{project_item_id}}]]
+ }
+
lappend link_list {}
lappend link_list "Tasks"
@@ -36,7 +41,12 @@
lappend link_list {}
lappend link_list "Processes"
- lappend link_list [list "${logger_url}?user_id=${user_id}"]
+ if [empty_string_p $project_item_id] {
+ lappend link_list [list "[export_vars -base ${logger_url} {user_id {project_manager_url $package_url}}]"]
+ } else {
+ set logger_project_id [pm::project::get_logger_project -project_item_id $project_item_id]
+ lappend link_list [list "[export_vars -base ${logger_url} {{project_manager_url $package_url} {project_id $logger_project_id}}]"]
+ }
lappend link_list {}
lappend link_list "Logger"