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 -N -r1.28 -r1.29
--- openacs-4/contrib/packages/project-manager/project-manager.info 25 Jun 2004 18:08:48 -0000 1.28
+++ openacs-4/contrib/packages/project-manager/project-manager.info 28 Jun 2004 17:00:32 -0000 1.29
@@ -7,14 +7,14 @@
f
f
-
+
Jade Rubick
Project management tool for OpenACS
- 2004-06-25
+ 2004-06-28
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/contrib/packages/project-manager/tcl/project-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-procs.tcl,v
diff -u -N -r1.14 -r1.15
--- openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 21 Jun 2004 22:20:43 -0000 1.14
+++ openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 28 Jun 2004 17:00:32 -0000 1.15
@@ -647,6 +647,9 @@
# Before hacking on this, you might want to look at:
# http://www.joelonsoftware.com/articles/fog0000000069.html
+ # the first thing that should be done on this code is that it
+ # should be broken out to a number of utility procs.
+
set debug 0
# TODO:
@@ -958,11 +961,11 @@
foreach task_item $task_list {
- if {[string is true $debug]} {
- ns_log Notice "* Earliest start ($task_item): $earliest_start($task_item)"
+ if {[string is true $debug] && [exists_and_not_null earliest_finish($task_item)]} {
+ ns_log Notice "* EF: ($task_item): $earliest_finish($task_item)"
}
- if {$max_earliest_finish < $earliest_finish($task_item)} {
+ if {[exists_and_not_null earliest_finish($task_item)] && $max_earliest_finish < $earliest_finish($task_item)} {
set max_earliest_finish $earliest_finish($task_item)
}
@@ -1080,6 +1083,11 @@
# we also set the latest_start date
+ if {[string is false [exists_and_not_null activity_time($task_item)]]} {
+ set activity_time($task_item) 0
+ ns_log Notice "setting activity_time($task_item) 0"
+ }
+
set late_start_temp \
[latest_start \
-end_date_j $latest_finish($task_item) \
@@ -1106,6 +1114,11 @@
} else {
set latest_finish($task_item) $end_date_j
+ if {[string is false [exists_and_not_null activity_time($task_item)]]} {
+ set activity_time($task_item) 0
+ ns_log Notice "setting activity_time($task_item) 0 (location 2)"
+ }
+
set latest_start($task_item) \
[latest_start \
-end_date_j $latest_finish($task_item) \
@@ -1248,6 +1261,11 @@
# the dependent item has a deadline
+ if {[string is false [exists_and_not_null activity_time($task_item)]]} {
+ set activity_time($task_item) 0
+ ns_log Notice "setting activity_time($task_item) 0 (location 3)"
+ }
+
set my_latest_start \
[latest_start \
-end_date_j $latest_start($dependent_item) \
@@ -1294,6 +1312,13 @@
if {[string is true $debug]} {
ns_log notice " setting latest start date (ignoring min_latest_start"
}
+
+ if {[string is false [exists_and_not_null activity_time($task_item)]]} {
+ set activity_time($task_item) 0
+ ns_log Notice "setting activity_time($task_item) 0 (location 4)"
+ }
+
+
set latest_start($task_item) \
[latest_start \
-end_date_j $latest_finish($task_item) \
@@ -1400,10 +1425,10 @@
foreach task_item $task_list {
if {[string is true $debug]} {
- ns_log Notice "*Latest start ($task_item): $latest_start($task_item)"
+ ns_log Notice "* LS ($task_item): $latest_start($task_item)"
}
- if {$min_latest_start > $latest_start($task_item)} {
+ if {[exists_and_not_null earliest_finish($task_item)] && $min_latest_start > $latest_start($task_item)} {
set max_earliest_finish $earliest_finish($task_item)
}
}
@@ -1422,9 +1447,19 @@
# this is very inefficient and stupid
foreach task_item $task_list {
- set es "J[expr ceil( [set earliest_start($task_item)])]"
- set ef "J[expr ceil( [set earliest_finish($task_item)])]"
+ if {[exists_and_not_null earliest_start($task_item)]} {
+ set es "J[expr ceil( [set earliest_start($task_item)])]"
+ } else {
+ set es ""
+ }
+
+ if {[exists_and_not_null earliest_finish($task_item)]} {
+ set ef "J[expr ceil( [set earliest_finish($task_item)])]"
+ } else {
+ set ef ""
+ }
+
if {[exists_and_not_null latest_start($task_item)]} {
set ls "J[expr floor([set latest_start($task_item)])]"
} else {