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.22 -r1.23 --- openacs-4/contrib/packages/project-manager/project-manager.info 19 May 2004 23:26:21 -0000 1.22 +++ openacs-4/contrib/packages/project-manager/project-manager.info 3 Jun 2004 21:31:55 -0000 1.23 @@ -7,33 +7,37 @@ f f - + Jade Rubick Project management tool for OpenACS - 2004-05-19 + 2004-06-03 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/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.16 -r1.17 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 19 May 2004 23:13:23 -0000 1.16 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 3 Jun 2004 21:32:00 -0000 1.17 @@ -51,7 +51,12 @@ v_folder_name, -- name ''Projects'', -- label ''Project Repository'', -- description - p_package_id -- parent_id + null, -- parent_id + p_package_id, -- context_id + null, -- folder_id + null, -- creation_date + null, -- creation_user + null -- creation_ip ); -- Register the standard content types Index: openacs-4/contrib/packages/project-manager/sql/postgresql/upgrade/upgrade-1.04b1-1.05.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/upgrade/Attic/upgrade-1.04b1-1.05.sql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/upgrade/upgrade-1.04b1-1.05.sql 3 Jun 2004 21:32:01 -0000 1.1 @@ -0,0 +1,53 @@ +-- +-- +-- +-- @author Jade Rubick (jader@bread.com) +-- @creation-date 2004-06-02 +-- @arch-tag: 91272478-d825-42e8-b628-534886dffd84 +-- @cvs-id $Id: upgrade-1.04b1-1.05.sql,v 1.1 2004/06/03 21:32:01 jader Exp $ +-- + +create or replace function pm_project__new_root_folder (integer) +returns integer as ' +declare + p_package_id alias for $1; + + v_folder_id cr_folders.folder_id%TYPE; + v_folder_name cr_items.name%TYPE; +begin + + -- raise notice ''in new root folder''; + + -- Set the folder name + v_folder_name := pm_project__new_unique_name (p_package_id); + + v_folder_id := content_folder__new ( + v_folder_name, -- name + ''Projects'', -- label + ''Project Repository'', -- description + null, -- parent_id + p_package_id, -- context_id + null, -- folder_id + null, -- creation_date + null, -- creation_user + null -- creation_ip + ); + + -- Register the standard content types + PERFORM content_folder__register_content_type ( + v_folder_id, -- folder_id + ''pm_project'', -- content_type + ''f'' -- include_subtypes + ); + + -- there is no facility in the API for adding in the package_id, + -- so we have to do it ourselves + + update cr_folders + set package_id = p_package_id + where folder_id = v_folder_id; + + -- TODO: Handle Permissions here for this folder. + + return v_folder_id; +end;' language 'plpgsql'; Index: openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-manager-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 30 Apr 2004 01:42:58 -0000 1.4 +++ openacs-4/contrib/packages/project-manager/tcl/project-manager-procs.tcl 3 Jun 2004 21:32:01 -0000 1.5 @@ -181,3 +181,24 @@ return $res } + + +ad_proc -public pm::util::logger_url {} { + Returns the URL for the primary logger URL + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-05-24 + + @return + + @error +} { + set return_val [parameter::get -parameter "LoggerPrimaryURL" -default ""] + + if {[empty_string_p $return_val]} { + ns_log Error "Project-manager: need to set up LoggerPrimaryURL in parameters" + util_user_message -message "Administrator needs to set up logger integration" + } + + return $return_val +} 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 -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 14 May 2004 23:08:56 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 3 Jun 2004 21:32:01 -0000 1.10 @@ -224,14 +224,23 @@ -project_lead $creation_user \ ] + # we want the logger project to show up in logger! + set logger_URLs [parameter::get -parameter "LoggerURLsToKeepUpToDate" -default ""] + foreach url $logger_URLs { + # get the package_id + set node_id [site_node::get_node_id -url $url] + array set node [site_node::get -node_id $node_id] + set this_package_id $node(package_id) + + logger::package::map_project \ + -project_id $logger_project \ + -package_id $this_package_id + } + # create a project manager project (associating the logger project # with the logger project) set project_revision [db_exec_plsql new_project_item { *SQL }] - # add in the default variable (hopefully hours) - logger::project::map_variable \ - -project_id $logger_project \ - -variable_id [logger::variable::get_default_variable_id] return $project_revision } @@ -291,6 +300,26 @@ @error } { + # if we edit the name of the project, we need to edit the logger + # project name too. + + set logger_project [pm::project::get_logger_project \ + -project_item_id $project_item_id] + + set active_p [pm::status::open_p -task_status_id $status_id] + set customer_name [organizations::name -organization_id "$organization_id"] + + if {![empty_string_p $customer_name]} { + append customer_name " - " + } + + logger::project::edit \ + -project_id $logger_project \ + -name "$customer_name$project_name" \ + -description "$description" \ + -project_lead $creation_user \ + -active_p $active_p + set returnval [db_exec_plsql update_project " select pm_project__new_project_revision ( :project_item_id, @@ -1342,6 +1371,33 @@ } +ad_proc -public pm::project::get_project { + -logger_project:required +} { + Returns the project_item_id when given the logger project + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-05-28 + + @param logger_project + + @return project_item_id + + @error +} { + return [db_string get_logger_project " + SELECT + i.item_id + FROM + pm_projectsx p, cr_items i + WHERE + i.live_revision = p.revision_id and logger_project = :logger_project + " -default "no_project"] + +} + + + ad_proc -public pm::project::get_list_of_open { } { Returns a list of lists, of all open project ids and their names @@ -1374,3 +1430,5 @@ return $return_val } + + Index: openacs-4/contrib/packages/project-manager/tcl/status-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/status-procs.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/tcl/status-procs.tcl 3 Jun 2004 21:32:02 -0000 1.1 @@ -0,0 +1,40 @@ +# + +ad_library { + + Procs for project manager status codes and so on. + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-05-21 + @arch-tag: 23a501b5-de19-4d4a-ad9f-57dfa5c8bbd3 + @cvs-id $Id: status-procs.tcl,v 1.1 2004/06/03 21:32:02 jader Exp $ +} + +namespace eval pm::status {} + +ad_proc -public pm::status::open_p { + -task_status_id:required +} { + Returns t if the task status code is open, f otherwise + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-05-21 + + @param task_status_id + + @return + + @error +} { + + set return_val [db_string get_open_p { + SELECT + case when status_type = 'c' then 'f' else 't' end + FROM + pm_task_status + WHERE + status_id = :task_status_id + }] + + return $return_val +} 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.6 -r1.7 --- openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 14 May 2004 23:08:56 -0000 1.6 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql 3 Jun 2004 21:32:02 -0000 1.7 @@ -74,7 +74,7 @@ - + SELECT r.item_id, 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.8 -r1.9 --- openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 14 May 2004 23:08:56 -0000 1.8 +++ openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl 3 Jun 2004 21:32:02 -0000 1.9 @@ -14,7 +14,7 @@ -ad_proc -public pm::task::dependency_options { +ad_proc -public pm::task::options_list { {-edit_p "f"} -project_item_id {-task_item_id ""} @@ -24,7 +24,8 @@ } { Returns a list of lists suitable for use in a select list for ad_form. Contains a list of possible tasks that this task can - depend upon. + depend upon, or selected. These tasks are limited to just the + one project.

@@ -1571,3 +1572,78 @@ } +ad_proc -public pm::task::update_percent { + -task_item_id:required + -percent_complete:required +} { + Updates the task's percent complete + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-05-24 + + @param task_item_id + + @param percent_complete + + @return + + @error +} { + + db_dml update_percent { + UPDATE + pm_tasks_revisions + SET + percent_complete = :percent_complete + WHERE + task_revision_id = (select + live_revision + from + cr_items + where + item_id = :task_item_id) + } + + if {$percent_complete >= 100} { + + pm::task::close -task_item_id $task_item_id + + } else { + + pm::task::open -task_item_id $task_item_id + + } + +} + + +ad_proc -public pm::task::estimated_hours_work { + -estimated_hours_work + -estimated_hours_work_min + -estimated_hours_work_max +} { + Displays the estimated hours work in a consistent format + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-06-02 + + @param estimated_hours_work + + @param estimated_hours_work_min + + @param estimated_hours_work_max + + @return + + @error +} { + set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] + + if {[string equal $use_uncertain_completion_times_p 1]} { + set display_value "$estimated_hours_work_min - $estimated_hours_work_max" + } else { + set display_value "$estimated_hours_work" + } + + return $display_value +} Index: openacs-4/contrib/packages/project-manager/www/add-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit-2.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/project-manager/www/add-edit-2.tcl 27 Apr 2004 00:49:29 -0000 1.5 +++ openacs-4/contrib/packages/project-manager/www/add-edit-2.tcl 3 Jun 2004 21:32:03 -0000 1.6 @@ -75,7 +75,7 @@ } {description:text(inform) - {label "Description"} + {label "Old Description"} {value $description} } @@ -91,7 +91,7 @@ } \ -new_data { - ad_returnredirect "one?[export_url_vars project_item_id]" + ad_returnredirect -message "Project changes saved" "one?[export_url_vars project_item_id]" ad_script_abort } -edit_data { @@ -100,7 +100,7 @@ } -after_submit { - ad_returnredirect "one?[export_url_vars project_item_id]" + ad_returnredirect -message "Project changes saved" "one?[export_url_vars project_item_id]" ad_script_abort } 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.17 -r1.18 --- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 27 Apr 2004 00:49:29 -0000 1.17 +++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 3 Jun 2004 21:32:03 -0000 1.18 @@ -70,6 +70,18 @@ } +if {[ad_form_new_p -key project_item_id]} { + set logger_project "" + set logger_values "" +} else { + + set logger_project [pm::project::get_logger_project -project_item_id $project_item_id] + set logger_values [logger::project::get_variables -project_id $logger_project] + +} + +ns_log Notice "Logger values: $logger_values" + ad_form -name add_edit \ -form { project_id:key @@ -128,22 +140,28 @@ {options {[db_list_of_lists get_status_codes { }]}} } + {variables:text(multiselect),multiple + {label "Logged variables"} + {options {[logger::ui::variable_options_all]}} + {values {$logger_values}} + {html {size 6}} + } + } - if {[exists_and_not_null project_id]} { if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} { ad_form -extend -name add_edit -form { {category_ids:integer(category),multiple {label "Categories"} - {html {size 4}} {value {$project_item_id $package_id}} + {html {size 7}} {value {$project_item_id $package_id}} } } } } else { if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} { ad_form -extend -name add_edit -form { - {category_ids:integer(category),multiple {label "Categories"} - {html {size 4}} {value {}} + {category_ids:integer(category),multiple,optional {label "Categories"} + {html {size 7}} {value {}} } } } @@ -177,7 +195,6 @@ -select_query_name project_query \ -on_submit { - set user_id [ad_conn user_id] set peeraddr [ad_conn peeraddr] @@ -215,16 +232,31 @@ ] set project_item_id [pm::project::get_project_item_id -project_id $project_id] + set logger_project [pm::project::get_logger_project -project_item_id $project_item_id] if {[exists_and_not_null category_ids]} { category::map_object -remove_old -object_id $project_item_id $category_ids } + if {[exists_and_not_null variables]} { + foreach var $variables { + logger::project::map_variable \ + -project_id $logger_project \ + -variable_id $var + } + } else { + # add in the default variable + logger::project::map_variable \ + -project_id $logger_project \ + -variable_id [logger::variable::get_default_variable_id] + } + if {$use_project_customizations_p} { - ad_returnredirect "add-edit-2?[export_url_vars project_item_id project_id]" + # warn of current bug so users can work around it + ad_returnredirect -message "You must submit changes on this page or you will lose any data on this page" "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_returnredirect -message "Project: '$project_name' added" "one?[export_url_vars project_item_id project_id]" ad_script_abort } @@ -256,19 +288,30 @@ set project_item_id [pm::project::get_project_item_id \ -project_id $project_id] + + set logger_project [pm::project::get_logger_project -project_item_id $project_item_id] + if {[exists_and_not_null variables]} { + + logger::project::remap_variables -project_id $logger_project -new_variable_list $variables + + } else { + logger::project::remap_variables -project_id $logger_project -new_variable_list [logger::variable::get_default_variable_id] + } + if {[exists_and_not_null category_ids]} { category::map_object -remove_old -object_id $project_item_id $category_ids } } -after_submit { if {$use_project_customizations_p} { - ad_returnredirect "add-edit-2?[export_url_vars project_id old_project_id]" + # warn of current bug so users can work around it + ad_returnredirect -message "You must submit changes on this page or you will lose any data on this page" "add-edit-2?[export_url_vars project_id old_project_id]" pm::project::compute_parent_status $project_item_id ad_script_abort } else { - ad_returnredirect "one?[export_url_vars project_id]" + ad_returnredirect -message "Changes to project saved" "one?[export_url_vars project_id]" pm::project::compute_parent_status $project_item_id ad_script_abort } Index: openacs-4/contrib/packages/project-manager/www/log.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/log.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/log.adp 12 Mar 2004 13:44:44 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/log.adp 3 Jun 2004 21:32:03 -0000 1.3 @@ -1,73 +1,11 @@ -@page_title;noquote@ +@title;noquote@ @context;noquote@ -log_entry_form.value - - -

- - - - - - - - - - - - - - -
- Add Entry -
- » - @variables.name@ -
-
- +The administrator needs to set up integration with logger. -
- -
+

- -

- » - Add new log entry -

- - - -

Log history (@start_date_ansi@ to @end_date_ansi@)

- -

- The log history is - shown @log_history_n_days@ days back from your last logged entry, or @log_history_n_days@ days back from - today if you have no previously logged entries. -

- - -
+After they have done this, you can go back to the previous page, + refresh it, and then add and edit logged hours. Index: openacs-4/contrib/packages/project-manager/www/log.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/log.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/project-manager/www/log.tcl 14 May 2004 23:08:57 -0000 1.5 +++ openacs-4/contrib/packages/project-manager/www/log.tcl 3 Jun 2004 21:32:03 -0000 1.6 @@ -1,477 +1,11 @@ ad_page_contract { - Add/edit/display a log entry for project manager + Stub that tells people to set up logger/project-manager integration - @author Peter Marklund (peter@collaboraid.biz) @author Jade Rubick (jader@bread.com) stolen from Peter @creation-date 2003-04-16 @cvs-id $Id$ -} { - entry_id:integer,optional - project_id:integer,optional - pm_project_id:integer - {pm_task_id:integer ""} - variable_id:integer,optional - {edit:boolean "f"} - {return_url "."} -} -validate { - #project_id_required_in_add_mode { - # For the sake of simplicity of the form - # we are requiring a project_id to be provided in add mode - #if { ![exists_and_not_null entry_id] && ![exists_and_not_null project_id] } { - # ad_complain "When adding a log entry a project_id must be provided (either entry_id or project_id must be present)." - #} - #} } -if { ![exists_and_not_null project_id] } { - - if {[exists_and_not_null entry_id]} { - # do nothing - } else { - set project_id [pm::project::get_logger_project \ - -project_item_id $pm_project_id] - - } -} - -set package_id [ad_conn package_id] -set current_user_id [ad_maybe_redirect_for_registration] - -if { [exists_and_not_null entry_id] } { - set entry_exists_p [db_string entry_exists_p {}] -} else { - set entry_exists_p 0 -} - -if { [string equal [form get_action log_entry_form] "done"] } { - # User is done editing - redirect back to index page - ad_returnredirect $return_url - ad_script_abort -} - -########### -# -# Get project and variable info -# -########### - -# Get project and variable id -if { $entry_exists_p } { - permission::require_permission -object_id $entry_id -privilege read - - # We have the entry_id so try to get project and variable_id from - # the database for that entry - logger::entry::get -entry_id $entry_id -array entry_array - set project_id $entry_array(project_id) - set variable_id $entry_array(variable_id) -} - -# Get project_id if it's not provided -if { [exists_and_not_null entry_id] && ![exists_and_not_null project_id] } { - logger::entry::get -entry_id $entry_id -array entry - set project_id $entry(project_id) -} - -# Default the variable we are logging in to the primary variable of the project -if { ![exists_and_not_null variable_id] } { - set variable_id [logger::project::get_primary_variable -project_id $project_id] - - if { [empty_string_p $variable_id] } { - ad_return_error "Project has no variable" "An administrator needs to associate a variable, such as time or expense, to this project before any logging can be done." - ad_script_abort - } -} - -# We need project and variable names -logger::project::get -project_id $project_id -array project_array -logger::variable::get -variable_id $variable_id -array variable_array - -########### -# -# Build the form -# -########### - -# The creator of a log entry can always edit it -if { $entry_exists_p } { - set edit_p [expr [permission::permission_p -object_id $entry_id -privilege write] || \ - $current_user_id == $entry_array(creation_user)] -} else { - set edit_p 0 -} - -# Different page title and form mode when adding a log entry -# versus displaying/editing one -if { [exists_and_not_null entry_id] } { - # Initial request in display or edit mode or a submit of the form - set page_title "Edit Log Entry" - if { [string equal $edit "t"] && $edit_p } { - set ad_form_mode edit - } else { - set ad_form_mode display - } -} else { - # Initial request in add mode - set page_title "Add Log Entry" - set ad_form_mode edit -} - - -# Build the log entry form elements -set actions [list] -if { $edit_p } { - lappend actions { Edit edit } -} -lappend actions { Done done } - -ad_form -name log_entry_form -cancel_url $return_url -mode $ad_form_mode \ - -actions $actions -form { - entry_id:key(acs_object_id_seq) - } - -# On various occasions we need to know if we are dealing with a submit with the -# form or an initial request (could also be with error message after unaccepted submit) -set submit_p [form is_valid log_entry_form] - -ad_form -extend -name log_entry_form -form { - {project:text(inform) - {label Project} - {section "Hour log"} - {value $project_array(name)} - } - - {project_id:integer(hidden) - {value $project_id} - } - - {variable_id:integer(hidden) - {value $variable_id} - } - - {return_url:text(hidden) {value $return_url}} -} - -# Add form elements common to all modes -# The form builder date datatype doesn't take ANSI format date strings -# but wants dates in list format -set default_date [clock format [clock seconds] -format "%Y %m %d"] -ad_form -extend -name log_entry_form -form { - {value:float - {label $variable_array(name)} - {after_html $variable_array(unit)} - {html {size 9 maxlength 9}} - } - - {pm_project_id:text(hidden) - {value $pm_project_id} - } - - {pm_task_id:text(hidden) - {value $pm_task_id} - } - - {description:text,optional - {label Description} - {html {size 50}} - } - - {time_stamp:date - {label Date} - {value $default_date} - } -} - -# allow the user to edit the percentage complete when necessary -if {[exists_and_not_null pm_task_id]} { - - set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] - - db_1row get_task_values " - SELECT - title as task_title, - case when percent_complete is null then 0 - else percent_complete end as percent_complete, - estimated_hours_work, - estimated_hours_work_min, - estimated_hours_work_max, - s.description as status_description - FROM - pm_tasks_revisionsx p, - cr_items i, - pm_task_status s, - pm_tasks t - WHERE i.item_id = p.item_id and - p.item_id = :pm_task_id and - i.item_id = t.task_id and - t.status = s.status_id and - p.revision_id = i.live_revision" - - ad_form -extend -name log_entry_form -form { - - {task_title:text(inform) - {section "Task"} - {label "Subject"} - {value $task_title} - } - - {status_description:text(inform) - {label "Status"} - {value $status_description} - } - - } - - if {[string equal $use_uncertain_completion_times_p 1]} { - - set display_value "$estimated_hours_work_min - $estimated_hours_work_max" - ad_form -extend -name log_entry_form -form { - - {estimated_hours_work:text(inform) - {label "Estimated work"} - {value $display_value} - {after_html "hours"} - } - - - } - - } else { - - ad_form -extend -name log_entry_form -form { - - {estimated_hours_work:text(inform) - {label "Estimated work"} - {value $estimated_hours_work} - {after_html "hours"} - } - - } - - } - - - ad_form -extend -name log_entry_form -form { - - {percent_complete:float - {label "Complete"} - {after_html "%"} - {html {size 9 maxlength 9}} - {value $percent_complete} - } - - } - -} - - -if { [exists_and_not_null pm_task_id] } { - set context [list [list "[ad_conn package_url]task-one?task_id=$pm_task_id" "$task_title"] $page_title] -} else { - - set context [list [list "[ad_conn package_url]one?project_item_id=$pm_project_id" "$project_array(name)"] $page_title] -} - - -########### -# -# Execute the form -# -########### - -ad_form -extend -name log_entry_form -select_query_name select_logger_entries -validate { - {value - { [regexp {^([0-9]{1,6}|[0-9]{0,6}\.[0-9]{0,2})$} $value] } - {The value may not contain more than two decimals and must be between 0 and 999999.99} - } - -} -new_data { - set time_stamp_ansi "[lindex $time_stamp 0]-[lindex $time_stamp 1]-[lindex $time_stamp 2]" - - # jarkko: check to see if user has already added this entry and has come - # back with her back button. If the entry exists, we give the user a complaint - # and a link to edit this particular entry. - if { [string match [db_string check_if_exists " - select 1 - from logger_entries - where entry_id = :entry_id - " -default "0"] "0"]} { - - pm::project::log_hours \ - -entry_id $entry_id \ - -logger_project_id $project_id \ - -variable_id $variable_id \ - -value $value \ - -timestamp_ansi $time_stamp_ansi \ - -description $description \ - -task_item_id $pm_task_id \ - -project_item_id $pm_project_id - - - if {[exists_and_not_null pm_task_id]} { - db_dml update_percent " - UPDATE - pm_tasks_revisions - SET - percent_complete = :percent_complete - WHERE - task_revision_id = (select - live_revision - from - cr_items - where - item_id = :pm_task_id)" - - if {$percent_complete >= 100} { - - pm::task::close -task_item_id $pm_task_id - - } else { - - pm::task::open -task_item_id $pm_task_id - - } - - } - - } else { - - doc_return 200 text/html "[ad_header_with_extra_stuff "Problem with Your Input" "" ""] -

Problem with Your Input

- -to [ad_system_name] - -
- -You have already added this entry once. If you want to edit this entry, click here. - -[ad_footer] - " - } - - # Present the user with an add form again for quick logging - ad_returnredirect "[ad_conn url]?[export_vars {project_id variable_id pm_project_id pm_task_id}]" - ad_script_abort - -} -edit_data { - set time_stamp_ansi "[lindex $time_stamp 0]-[lindex $time_stamp 1]-[lindex $time_stamp 2]" - logger::entry::edit -entry_id $entry_id \ - -value $value \ - -time_stamp $time_stamp_ansi \ - -description $description - - set old_pm_task_id $pm_task_id - - set pm_task_id [db_string task_entry_p "select task_item_id from pm_task_logger_proj_map where logger_entry = :entry_id" -default "-1"] - - if {![string equal $pm_task_id -1] && [exists_and_not_null percent_complete]} { - - db_dml update_percent " - UPDATE - pm_tasks_revisions - SET - percent_complete = :percent_complete - WHERE - task_revision_id = (select - live_revision - from - cr_items - where - item_id = :pm_task_id)" - - pm::task::update_hours \ - -task_item_id $pm_task_id - - if {$percent_complete >= 100} { - set status_code [pm::task::default_status_closed] - } else { - set status_code [pm::task::default_status_open] - } - - db_dml update_percent " - UPDATE - pm_tasks - SET - status = :status_code - WHERE - task_id = :pm_task_id" - - - } - - set pm_task_id $old_pm_task_id - -} -after_submit { - ad_returnredirect "[ad_conn url]?[export_vars { project_id variable_id return_url pm_project_id pm_task_id}]" - # ad_returnredirect $return_url - - if {![string equal $pm_task_id -1]} { - pm::project::compute_status $pm_project_id - } - - ad_script_abort -} - -########### -# -# Log history -# -########### - -# Show the log history if the user is looking at /editing his own entry or if -# the user is adding a new entry -if { $entry_exists_p && [string equal $current_user_id $entry_array(creation_user)] } { - set entry_edited_by_owner_p 1 -} else { - set entry_edited_by_owner_p 0 -} - -set show_log_history_p [expr $entry_edited_by_owner_p || ! $entry_exists_p] - -if { $show_log_history_p } { - # Show N number of days previous to the last logged entry by the user - set ansi_format_string "%Y-%m-%d" - set last_logged_date [db_string last_logged_date { - select max(to_char(le.time_stamp, 'YYYY-MM-DD')) - from logger_entries le, - acs_objects ao - where le.entry_id = ao.object_id - and le.variable_id = :variable_id - and le.project_id = :project_id - and ao.creation_user = :current_user_id - } -default ""] - - if { ![empty_string_p $last_logged_date] } { - set end_date_ansi $last_logged_date - set end_date_seconds [clock scan $end_date_ansi] - } else { - # Default end date to now - set end_date_seconds [clock seconds] - set end_date_ansi [clock format $end_date_seconds -format $ansi_format_string] - } - set log_history_n_days 31 - set seconds_per_day [expr 60*60*24] - set start_date_seconds [expr $end_date_seconds - $log_history_n_days * $seconds_per_day] - set start_date_ansi [clock format $start_date_seconds \ - -format $ansi_format_string] -} - -set add_entry_url "log?[export_vars { project_id variable_id pm_project_id pm_task_id}]" - -if { [info exists entry_id] } { - set entry_id_or_blank $entry_id -} else { - set entry_id_or_blank {} -} - - -##### -# -# Change variable -# -##### - -db_multirow -extend { url selected_p } variables select_variables {} { - set url "log?[export_vars -override { {variable_id $unique_id} } { project_id pm_project_id pm_task_id}]" - set selected_p [string equal $variable_id $unique_id] -} +set title "Set up logger integration" +set context [list] Index: openacs-4/contrib/packages/project-manager/www/log.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/log.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/log.xql 12 Mar 2004 13:44:45 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/log.xql 3 Jun 2004 21:32:05 -0000 1.3 @@ -2,38 +2,4 @@ - - - select count(*) - from logger_entries - where entry_id = :entry_id - - - - - - select project_id, - variable_id, - value, - to_char(time_stamp, 'YYYY MM DD') as time_stamp, - description - from logger_entries - where entry_id = :entry_id - - - - - - select lv.variable_id as unique_id, - lv.name || ' (' || lv.unit || ')' as name - from logger_variables lv, - logger_projects lp, - logger_project_var_map lpvm - where lp.project_id = lpvm.project_id - and lv.variable_id = lpvm.variable_id - and lp.project_id = :project_id - group by lv.variable_id, lv.name, lv.unit - - - 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.24 -r1.25 --- openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 27 Apr 2004 00:49:29 -0000 1.24 +++ openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 3 Jun 2004 21:32:05 -0000 1.25 @@ -31,33 +31,6 @@
- - - SELECT - p.item_id, - p.project_id, - p.title as project_name, - p.project_code, - p.goal, - p.description, - to_char(p.planned_start_date,'Mon DD') as planned_start_date, - to_char(p.planned_end_date,'Mon DD') as planned_end_date, - p.ongoing_p, - i.live_revision, - to_char(p.estimated_finish_date,'Mon DD') as estimated_finish_date, - to_char(p.earliest_finish_date,'Mon DD') as earliest_finish_date, - to_char(p.latest_finish_date,'Mon DD') as latest_finish_date, - p.estimated_hours_total - FROM - pm_projectsx p, cr_items i - WHERE - p.item_id = :project_item_id and - p.item_id = i.item_id - ORDER BY - p.project_id desc - - - SELECT 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.34 -r1.35 --- openacs-4/contrib/packages/project-manager/www/one.adp 19 May 2004 21:05:51 -0000 1.34 +++ openacs-4/contrib/packages/project-manager/www/one.adp 3 Jun 2004 21:32:05 -0000 1.35 @@ -4,10 +4,10 @@ @context;noquote@ -

(not current, select live version below)

+

(not current, select live version from the task change page)

- +
@@ -155,44 +155,61 @@

- + + + + + + + + + + +
Subprojects
Add subproject + + + +
+ +

+ + - + - - +
SubprojectsComments
Add subproject - - - + + @comments;noquote@ +
    +
  • @comments_link;noquote@ +

- + - - + - + +
CommentsActions
- @comments;noquote@ -

- @comments_link;noquote@ +

+
+ + + - - -   - - - TASKS @@ -238,39 +255,39 @@ - + - - -
Logged hoursLogger
- - Log hours - + +
+ @variable_widget;noquote@ + @variable_exports;noquote@ + @day_widget;noquote@ + +
+
- @log_note@ -
- + +
-

-

REVISIONS

- -

- - - -

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.35 -r1.36 --- openacs-4/contrib/packages/project-manager/www/one.tcl 19 May 2004 21:05:51 -0000 1.35 +++ openacs-4/contrib/packages/project-manager/www/one.tcl 3 Jun 2004 21:32:13 -0000 1.36 @@ -21,14 +21,16 @@ @param use_goal_p Specifies whether or not to include the goal field 1 = yes @param use_project_code_p Specifies whether or not to show the user-specified project code 1 = yes @param use_uncertain_completion_times_p Specifies whether or not to use PERT style uncertainty times 1 = yes + @param logger_days The number of days back to view logged entries } { project_item_id:integer,optional project_id:integer,optional {orderby_subproject ""} {orderby_tasks ""} - {orderby_versions ""} {status_type "o"} + {logger_variable_id:integer ""} + {logger_days:integer "30"} } -properties { categories:onelist @@ -39,7 +41,6 @@ people:multirow write_p:onevalue create_p:onevalue - versions:multirow custom:multirow parent_task_id:onevalue task_type:onevalue @@ -54,14 +55,22 @@ comments:onevalue comments_link:onevalue } -validate { + project_exists { + if {![exists_and_not_null project_item_id] && \ + ![exists_and_not_null project_id]} { + + ad_complain "No project passed in" + + } + } project_item_id_exists { - if {![exists_and_not_null project_item_id]} { + if {![exists_and_not_null project_item_id] && [exists_and_not_null project_id]} { set project_item_id [pm::project::get_project_item_id \ -project_id $project_id] } } project_id_exists { - if {![exists_and_not_null project_id]} { + if {![exists_and_not_null project_id] && [exists_and_not_null project_item_id]} { set project_id [pm::project::get_project_id \ -project_item_id $project_item_id] } @@ -71,6 +80,11 @@ set status_type "o" } } + logger_days_positive { + if {$logger_days < 1} { + set logger_days 1 + } + } } set original_project_id $project_id @@ -81,8 +95,9 @@ # --------------------------------------------------------------- # # the unique identifier for this package -set package_id [ad_conn package_id] -set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] +set package_url [ad_conn package_url] +set user_id [ad_maybe_redirect_for_registration] # ---------------- # general comments @@ -92,14 +107,15 @@ set comments_link [general_comments_create_link -object_name "Project" -link_text "Add a comment" -context_id $package_id $project_item_id "[ad_conn url]?project_item_id=$project_item_id"] -# terminology +# terminology and other parameters set project_term [parameter::get -parameter "ProjectName" -default "Project"] set project_term_lower [parameter::get -parameter "projectname" -default "project"] set task_term [parameter::get -parameter "TaskName" -default "Task"] 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"] +set use_subprojects_p [parameter::get -parameter "UseSubprojectsP" -default "0"] # permissions permission::require_permission -party_id $user_id -object_id $package_id -privilege read @@ -129,16 +145,34 @@ set project(estimated_finish_date) [lc_time_fmt $project(estimated_finish_date) "%x"] set project(earliest_finish_date) [lc_time_fmt $project(earliest_finish_date) "%x"] set project(latest_finish_date) [lc_time_fmt $project(latest_finish_date) "%x"] -set project(logger_variable_id) [logger::variable::get_default_variable_id] -set log_url "[ad_conn package_url]log?project_id=$project(logger_project)&pm_project_id=$project_item_id" +# we can also get the link to the logger instance. +set logger_url [pm::util::logger_url] +set logger_project_url "$logger_url?project_id=$project(logger_project)" -set then_ansi [db_string get_now_julian "select to_char(current_timestamp - '30 days'::INTERVAL,'YYYY-MM-DD')"] +if {![exists_and_not_null logger_variable_id]} { + #set logger_variable_id + # [logger::variable::get_default_variable_id] + set logger_variable_id [logger::project::get_primary_variable \ + -project_id $project(logger_project)] +} +set variable_widget [logger::ui::variable_select_widget \ + -project_id $project(logger_project) \ + -current_variable_id $logger_variable_id \ + -select_name logger_variable_id] -set log_note "Last 30 days" +set variable_exports [export_vars -form -entire_form -exclude {logger_variable_id logger_days }] +set log_url "${logger_url}log?project_id=$project(logger_project)&pm_project_id=$project_item_id&return_url=$return_url&variable_id=$logger_variable_id" +set today_ansi [clock format [clock scan today] -format "%Y-%m-%d"] +set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"] + + +set day_widget "Last Days" + + set my_title "$project_term \#$project_item_id: $project(project_name)" @@ -235,23 +269,18 @@ orderby_subproject { hide_p 1 } - orderby_versions { - hide_p 1 - } orderby_people { hide_p 1 } } \ -orderby { default_value latest_start,asc title { - label "Subject" orderby_asc "title asc" orderby_desc "title desc" default_direction asc } earliest_start { - label "Earliest start" orderby_asc "earliest_start, u.first_names, u.last_name" orderby_desc "earliest_start desc, u.first_names, u.last_name" default_direction asc @@ -294,52 +323,51 @@ } +if {$use_subprojects_p} { -# Subprojects, using list-builder --------------------------------- - -db_multirow subproject project_subproject_query { } - -template::list::create \ - -name subproject \ - -multirow subproject \ - -key item_id \ - -elements { - project_name { - label "Subject" - link_url_col item_url - link_html { title "View this subproject" } + # Subprojects, using list-builder --------------------------------- + + db_multirow subproject project_subproject_query { } + + template::list::create \ + -name subproject \ + -multirow subproject \ + -key item_id \ + -elements { + project_name { + label "Subject" + link_url_col item_url + link_html { title "View this subproject" } + } + actual_hours_completed { + label "Hours completed" + } + } \ + -sub_class { + narrow + } \ + -filters { + project_item_id {} + orderby_tasks {} + orderby_people {} + } \ + -orderby { + project_name {orderby project_name} + default_value project_name,desc + } \ + -orderby_name orderby_subproject \ + -html { + width 100% } - actual_hours_completed { - label "Hours completed" - } - } \ - -sub_class { - narrow - } \ - -filters { - project_item_id {} - orderby_versions {} - orderby_tasks {} - orderby_people {} - orderby_versions {} - } \ - -orderby { - project_name {orderby project_name} - default_value project_name,desc - } \ - -orderby_name orderby_subproject \ - -html { - width 100% + + + + db_multirow -extend { item_url } subproject project_subproject_query { + } { + set item_url [export_vars -base "one" -override {{project_item_id $item_id}} {project_item_id}] } - - - -db_multirow -extend { item_url } subproject project_subproject_query { -} { - set item_url [export_vars -base "one" -override {{project_item_id $item_id}} {project_item_id}] } - # People, using list-builder --------------------------------- db_multirow people project_people_query { } @@ -362,7 +390,6 @@ -filters { party_id {} orderby_subproject {} - orderby_versions {} orderby_tasks {} } \ -orderby { @@ -383,54 +410,6 @@ -# Project versions, using list-builder --------------------------------- - -db_multirow versions project_versions { } - -template::list::create \ - -name versions \ - -multirow versions \ - -key item_id \ - -elements { - project_id { - label "Version" - link_url_col item_url - link_html { title "View this project version" } - } - project_name { - label "Subject" - } - planned_end_date { - label "Deadline" - } - } \ - -sub_class { - narrow - } \ - -filters { - project_item_id {} - orderby_subproject {} - orderby_people {} - orderby_tasks {} - } \ - -orderby { - project_name {orderby project_name} - default_value project_name,desc - } \ - -orderby_name orderby_versions \ - -html { - width 100% - } - - -db_multirow -extend { item_url } versions project_versions { -} { - set item_url [export_vars -base "one" -override {{project_item_id $item_id}} {project_id}] - - -} - - # -------------------------CUSTOMIZATIONS-------------------------- # If there are customizations, put them in a multirow called custom # ----------------------------------------------------------------- @@ -441,12 +420,5 @@ # end of customizations -# ----------------------------------------------------------------- -# Logger forms and so on - shows time logged, and allows you to log -# other time -# ----------------------------------------------------------------- - - - ad_return_template # ------------------------- END OF FILE ------------------------- # Index: openacs-4/contrib/packages/project-manager/www/process-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-add-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/packages/project-manager/www/process-add-edit.tcl 27 Apr 2004 00:49:29 -0000 1.5 +++ openacs-4/contrib/packages/project-manager/www/process-add-edit.tcl 3 Jun 2004 21:32:13 -0000 1.6 @@ -78,7 +78,7 @@ db_dml new_process { *SQL* } - ad_returnredirect "process-task-add-edit?[export_vars -url {{number $number_of_tasks} process_id}]" + ad_returnredirect -message "Process added. Now add process tasks." "process-task-add-edit?[export_vars -url {{number $number_of_tasks} process_id}]" ad_script_abort } -edit_data { @@ -87,7 +87,7 @@ } -after_submit { - ad_returnredirect "process-task-add-edit?[export_vars -url {{number $number_of_tasks} process_id}]" + ad_returnredirect -message "Process changes saved. Now edit process tasks" "process-task-add-edit?[export_vars -url {{number $number_of_tasks} process_id}]" ad_script_abort } Index: openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-dependency-add-edit.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl 12 May 2004 21:50:42 -0000 1.8 +++ openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl 3 Jun 2004 21:32:13 -0000 1.9 @@ -140,7 +140,7 @@ } -after_submit { - ad_returnredirect [export_vars -base process-one -url {process_id}] + ad_returnredirect -message "Process task dependencies saved" [export_vars -base process-one -url {process_id}] ad_script_abort } Index: openacs-4/contrib/packages/project-manager/www/process-task-add-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-add-edit-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/contrib/packages/project-manager/www/process-task-add-edit-2.tcl 27 Apr 2004 00:49:29 -0000 1.7 +++ openacs-4/contrib/packages/project-manager/www/process-task-add-edit-2.tcl 3 Jun 2004 21:32:13 -0000 1.8 @@ -187,5 +187,5 @@ } -ad_returnredirect "process-task-assign-add-edit?[export_vars -url {use_dependency:multiple process_id process_task_id:multiple}]" +ad_returnredirect -message "Process task saved" "process-task-assign-add-edit?[export_vars -url {use_dependency:multiple process_id process_task_id:multiple}]" ad_script_abort Index: openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-assign-add-edit.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl 27 Apr 2004 00:49:29 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/www/process-task-assign-add-edit.tcl 3 Jun 2004 21:32:13 -0000 1.10 @@ -288,7 +288,7 @@ #set task_revisions $revision_has_dependencies - ad_returnredirect "process-dependency-add-edit?[export_vars -url {process_task_id:multiple process_id use_dependency:multiple}]" + ad_returnredirect -message "Process task assignments made. Now set up dependencies" "process-dependency-add-edit?[export_vars -url {process_task_id:multiple process_id use_dependency:multiple}]" ad_script_abort } Index: openacs-4/contrib/packages/project-manager/www/process-task-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-task-delete-2.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/project-manager/www/process-task-delete-2.tcl 14 May 2004 17:30:04 -0000 1.4 +++ openacs-4/contrib/packages/project-manager/www/process-task-delete-2.tcl 3 Jun 2004 21:32:13 -0000 1.5 @@ -21,4 +21,4 @@ db_dml delete_process_tasks { } -ad_returnredirect "process-one?[export_vars -url {process_id}]" +ad_returnredirect -message "Process task deleted" "process-one?[export_vars -url {process_id}]" Index: openacs-4/contrib/packages/project-manager/www/project-revisions-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/project-revisions-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/project-revisions-postgresql.xql 3 Jun 2004 21:32:13 -0000 1.1 @@ -0,0 +1,44 @@ + + + + + + + + + + + postgresql + 7.3 + + + + + SELECT + p.item_id, + p.project_id, + p.title as project_name, + p.project_code, + p.goal, + p.description, + p.mime_type, + to_char(p.planned_start_date,'Mon DD') as planned_start_date, + to_char(p.planned_end_date,'Mon DD') as planned_end_date, + p.ongoing_p, + i.live_revision, + to_char(p.estimated_finish_date,'Mon DD') as estimated_finish_date, + to_char(p.earliest_finish_date,'Mon DD') as earliest_finish_date, + to_char(p.latest_finish_date,'Mon DD') as latest_finish_date, + p.estimated_hours_total + FROM + pm_projectsx p, cr_items i + WHERE + p.item_id = :project_item_id and + p.item_id = i.item_id + ORDER BY + p.project_id asc + + + + + Index: openacs-4/contrib/packages/project-manager/www/project-revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/project-revisions.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/project-revisions.adp 3 Jun 2004 21:32:13 -0000 1.1 @@ -0,0 +1,7 @@ + + @title@ + @context@ + + + + Index: openacs-4/contrib/packages/project-manager/www/project-revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/project-revisions.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/project-revisions.tcl 3 Jun 2004 21:32:13 -0000 1.1 @@ -0,0 +1,97 @@ +# + +ad_page_contract { + + Shows all the revisions of a project + + @author Jade Rubick (jader@bread.com) + @creation-date 2004-04-30 + @arch-tag: 339a6143-11a3-4f1b-902d-a3cd71f7d531 + @cvs-id $Id: project-revisions.tcl,v 1.1 2004/06/03 21:32:13 jader Exp $ + +} { + project_item_id:integer +} -properties { + revisions:multirow +} -validate { +} -errors { +} + + +set title "Project Changes" + +set context [list "one?project_item_id=$project_item_id Project" "View Revisions"] + + +# Project Revisions, using list-builder --------------------------------- + +template::list::create \ + -name revisions \ + -multirow revisions \ + -key project_id \ + -elements { + project_id { + label "Subject" + display_col project_name + link_url_col item_url + link_html { title "View this revision" } + display_template {@revisions.project_name@@revisions.project_name@} + } + description { + label "Description" + display_template { + @revisions.description_rich;noquote@ + } + } + planned_end_date { + label "Deadline" + } + } \ + -sub_class { + narrow + } + + +set descriptions [list] + +db_multirow -extend { item_url description_rich old_revision_id } revisions project_revisions_query { +} { + set item_url [export_vars -base "one" -override {{project_item_id $item_id}} { project_id }] + + set richtext_list [list $description $mime_type] + + set description_rich [template::util::richtext::get_property html_value $richtext_list] + + set descriptions_length [llength $descriptions] + + # if there isn't any previous items, then we don't have to do a + # word diff. All the content is new. + if {$descriptions_length < 1} { + set description_rich $description_rich + lappend descriptions "$description_rich" + + } else { + + set old_description [lindex $descriptions [expr [llength $descriptions] - 1]] + set old_description [ad_html_to_text $old_description] + lappend descriptions "$description_rich" + + set description_rich [pm::util::word_diff \ + -split_by " " \ + -old "$old_description" \ + -start_old "" \ + -end_old "" \ + -start_new "" \ + -end_new "" \ + -new "[ad_html_to_text $description_rich]" \ + -filter_proc ""] + + # set description_rich [ad_html_to_text $description_rich] + set description_rich [ad_text_to_html -no_quote -includes_html -- $description_rich] + + } + +} + + + Index: openacs-4/contrib/packages/project-manager/www/style.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/style.css,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/www/style.css 12 Mar 2004 13:44:45 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/www/style.css 3 Jun 2004 21:32:13 -0000 1.10 @@ -1 +1,3 @@ +TD.highlighted { + background-color:ccccff; +} 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.33 -r1.34 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 14 May 2004 23:08:57 -0000 1.33 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 3 Jun 2004 21:32:13 -0000 1.34 @@ -764,7 +764,7 @@ } - set dependency_options_full [pm::task::dependency_options \ + set dependency_options_full [pm::task::options_list \ -edit_p $edit_p \ -task_item_id $task_item_id_arr($i) \ -project_item_id $project_item_id_arr($i) \ @@ -1172,7 +1172,7 @@ } -after_submit { - ad_returnredirect "task-assign-add-edit?[export_vars -url {comment_list edit_p return_url process_task_id:multiple revisions:multiple task_id:multiple old_description}]" + ad_returnredirect -message "Task(s) saved. Now choose assignees" "task-assign-add-edit?[export_vars -url {comment_list edit_p return_url process_task_id:multiple revisions:multiple task_id:multiple old_description}]" # compile a list of which projects the tasks are assigned to # there is a bug here, because we don't update a project when a Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 14 May 2004 23:08:57 -0000 1.15 +++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 3 Jun 2004 21:32:13 -0000 1.16 @@ -74,21 +74,21 @@ } if {[string equal $open_p 0]} { - ad_returnredirect $return_url + ad_returnredirect -message "Task closed" $return_url } } -# The number of assignments is set to 9, or the number of assignees + -# 2 if there are more than 5 assignees -set NUMBER_OF_ASSIGNMENTS 9 +# The number of assignments is set to 11, or the number of assignees + +# 3 if there are more than 5 assignees +set NUMBER_OF_ASSIGNMENTS 11 # find out the maximum number of assignees db_foreach get_count "select count(task_id) as my_count from pm_task_assignment where task_id in ([join $task_id ", "]) group by task_id" { if {$my_count > $NUMBER_OF_ASSIGNMENTS} { - set NUMBER_OF_ASSIGNMENTS [expr $my_count + 2] + set NUMBER_OF_ASSIGNMENTS [expr $my_count + 3] } } @@ -391,13 +391,13 @@ } -after_submit { if {[exists_and_not_null return_url]} { - ad_returnredirect $return_url + ad_returnredirect -message "Task assignments saved" $return_url } else { if {[llength $task_id] > 1} { - ad_returnredirect "tasks" + ad_returnredirect -message "Task assignments saved" "tasks" } else { - ad_returnredirect "task-one?task_id=$task_id" + ad_returnredirect -message "Task assignments saved" "task-one?task_id=$task_id" } } ad_script_abort Index: openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one-postgresql.xql,v diff -u -r1.23 -r1.24 --- openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 14 May 2004 23:08:57 -0000 1.23 +++ openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 3 Jun 2004 21:32:13 -0000 1.24 @@ -7,6 +7,7 @@ t.item_id, t.parent_id as project_item_id, t.title as task_title, + t.revision_id, t.description, t.mime_type, to_char(t.end_date,'Mon DD ''YY') as end_date, Index: openacs-4/contrib/packages/project-manager/www/task-one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.adp,v diff -u -r1.30 -r1.31 --- openacs-4/contrib/packages/project-manager/www/task-one.adp 19 May 2004 21:05:51 -0000 1.30 +++ openacs-4/contrib/packages/project-manager/www/task-one.adp 3 Jun 2004 21:32:13 -0000 1.31 @@ -4,7 +4,11 @@ @task_info.task_title;noquote@ @closed_message@ @context;noquote@ - + +

(not current, select live version from the task change page)

+
+ +
- - - - - - - - - - - - - - - - - - - - - - - - @@ -118,6 +98,39 @@
@@ -65,30 +69,6 @@
Dates
Earliest start@task_info.earliest_start@
Earliest finish@task_info.earliest_finish@
Latest start@task_info.latest_start@
Latest finish@task_info.latest_start@
Actions
+ + + + + + + +
Dates
+ + + + + + + + + + + + + + + + + + + + +
Earliest start@task_info.earliest_start@
Earliest finish@task_info.earliest_finish@
Latest start@task_info.latest_start@
Latest finish@task_info.latest_start@
+
+

+ @@ -128,7 +141,73 @@
Assignees
+ +

+ + + + + + + + + + + + + + + + + + + + +
Logger
+ Projected: + + @task_info.estimated_hours_work_min@ - + @task_info.estimated_hours_work_max@ hrs + + + @task_info.estimated_hours_work@ hrs + + + (@task_info.percent_complete@% complete)
+ + Slack: n/a + + + Slack: @task_info.slack_time@
+
+ + Slack: @task_info.slack_time@
+
+
+
+ @variable_widget;noquote@ + @variable_exports;noquote@ + @day_widget;noquote@ + +
+
+ +
+

@@ -168,62 +247,6 @@
-

- - - - - - - - - - - - - - - - - - - - - - - - -
Logged hours
- Total work: - - @task_info.estimated_hours_work_min@ - - @task_info.estimated_hours_work_max@ hrs estimated - - - @task_info.estimated_hours_work@ hrs estimated - - - @task_info.percent_complete@% complete
- - Slack: @task_info.slack_time@
-
- - Slack: n/a - -
- - Log hours - - - @log_note@ -
- -
-

Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v diff -u -r1.30 -r1.31 --- openacs-4/contrib/packages/project-manager/www/task-one.tcl 17 May 2004 17:50:16 -0000 1.30 +++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 3 Jun 2004 21:32:13 -0000 1.31 @@ -18,11 +18,14 @@ @param context_bar value for context bar creation @param orderby_dependency specifies how the dependencies will be sorted @param orderby_dependency2 specifies how the dependencies will be sorted (for tasks that have dependencies on this task) + @param logger_days The number of days back to view logged entries } { task_id:integer,optional task_revision_id:integer,optional orderby_dependency:optional orderby_dependency2:optional + {logger_variable_id:integer ""} + {logger_days:integer "30"} } -properties { closed_message:onevalue notification_chunk:onevalue @@ -62,6 +65,11 @@ } } } + logger_days_positive { + if {$logger_days < 1} { + set logger_days 1 + } + } } -errors { task_id_exists {That task does not exist} revision_id_exists {That task does not exist} @@ -81,8 +89,9 @@ # the unique identifier for this package -set package_id [ad_conn package_id] -set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] +set package_url [ad_conn package_url] +set user_id [ad_maybe_redirect_for_registration] # permissions @@ -121,6 +130,7 @@ } + # set link to comments set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[ad_conn url]?task_id=$task_id"] @@ -138,12 +148,28 @@ set logger_project [pm::project::get_logger_project \ -project_item_id $task_info(project_item_id)] -set logger_variable_id [logger::variable::get_default_variable_id] -set log_url "[ad_conn package_url]log?project_id=$logger_project&pm_project_id=$task_info(project_item_id)&pm_task_id=$task_id" +set logger_url [pm::util::logger_url] -set log_note "Task logged time listed below" +if {[empty_string_p $logger_variable_id]} { + set logger_variable_id [logger::variable::get_default_variable_id] +} +set log_url [export_vars -base "${logger_url}log" {{return_url $return_url} {project_id $logger_project} {pm_project_id $task_info(project_item_id)} {pm_task_id $task_id}}] + +set today_ansi [clock format [clock scan today] -format "%Y-%m-%d"] +set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"] + +set day_widget "Last Days" + +set variable_widget [logger::ui::variable_select_widget \ + -project_id $logger_project \ + -current_variable_id $logger_variable_id \ + -select_name logger_variable_id] + +set variable_exports [export_vars -form -entire_form -exclude {logger_variable_id logger_days }] + + # ------------------ # Notifications info # ------------------ @@ -389,3 +415,4 @@ ad_return_template # ------------------------- END OF FILE ------------------------- # + Index: openacs-4/contrib/packages/project-manager/www/task-revisions-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-revisions-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/project-manager/www/task-revisions-postgresql.xql 30 Apr 2004 21:32:33 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/www/task-revisions-postgresql.xql 3 Jun 2004 21:32:13 -0000 1.2 @@ -33,7 +33,8 @@ t.item_id = :task_id and t.item_id = i.item_id and t.creation_user = p.person_id - [template::list::orderby_clause -name revisions -orderby] + ORDER BY + t.revision_id asc
Index: openacs-4/contrib/packages/project-manager/www/task-revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-revisions.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/project-manager/www/task-revisions.tcl 30 Apr 2004 21:32:33 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/www/task-revisions.tcl 3 Jun 2004 21:32:13 -0000 1.2 @@ -21,7 +21,7 @@ } -set task_term [parameter::get -parameter "TaskName" -default "Task"] +set task_term [parameter::get -parameter "TaskName" -default "Task Revisions"] set title "$task_term Changes" @@ -64,34 +64,49 @@ label "Deadline" } } \ - -orderby { - revision_id {orderby revision_id} - percent_complete {orderby percent_complete} - end_date {orderby end_date} - default_value revision_id,desc - } \ - -orderby_name orderby_revisions \ -sub_class { narrow - } \ - -filters { - task_revision_id {} - orderby_dependency {} - orderby_dependency2 {} - } \ - -html { - width 100% - } + } +set descriptions [list] -db_multirow -extend { item_url description_rich } revisions task_revisions_query { +db_multirow -extend { item_url description_rich old_revision_id } revisions task_revisions_query { } { set item_url [export_vars -base "task-one" -override {{task_revision_id $revision_id}} -exclude {revision_id} { revision_id task_id}] set richtext_list [list $description $mime_type] set description_rich [template::util::richtext::get_property html_value $richtext_list] + set descriptions_length [llength $descriptions] + + # if there isn't any previous items, then we don't have to do a + # word diff. All the content is new. + if {$descriptions_length < 1} { + set description_rich $description_rich + lappend descriptions "$description_rich" + + } else { + + set old_description [lindex $descriptions [expr [llength $descriptions] - 1]] + set old_description [ad_html_to_text $old_description] + lappend descriptions "$description_rich" + + set description_rich [pm::util::word_diff \ + -split_by " " \ + -old "$old_description" \ + -start_old "" \ + -end_old "" \ + -start_new "" \ + -end_new "" \ + -new "[ad_html_to_text $description_rich]" \ + -filter_proc ""] + + # set description_rich [ad_html_to_text $description_rich] + set description_rich [ad_text_to_html -no_quote -includes_html -- $description_rich] + + } + } Index: openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql 27 Apr 2004 00:49:29 -0000 1.6 +++ openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql 3 Jun 2004 21:32:13 -0000 1.7 @@ -12,6 +12,8 @@ t.title, t.description, t.parent_id as project_item_id, + proj_rev.logger_project, + proj_rev.title as project_name, to_char(t.earliest_start,'J') as earliest_start_j, to_char(current_timestamp,'J') as today_j, to_char(t.latest_start,'J') as latest_start_j, @@ -36,11 +38,15 @@ LEFT JOIN pm_task_assignment ta ON t.item_id = ta.task_id LEFT JOIN persons p - ON ta.party_id = p.person_id + ON ta.party_id = p.person_id, + cr_items proj, + 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 + t.task_revision_id = i.live_revision and + t.parent_id = proj.item_id and + proj.live_revision = proj_rev.revision_id [template::list::filter_where_clauses -and -name tasks] [template::list::orderby_clause -orderby -name tasks] 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.12 -r1.13 --- openacs-4/contrib/packages/project-manager/www/tasks.tcl 19 May 2004 20:39:31 -0000 1.12 +++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 3 Jun 2004 21:32:13 -0000 1.13 @@ -49,6 +49,7 @@ set hidden_vars [export_vars -form $exporting_vars] # how to get back here set return_url [ad_return_url -qualified] +set logger_url [pm::util::logger_url] # set up context bar set context [list "Tasks"] @@ -127,14 +128,15 @@ } actual_hours_worked { label "Hours completed" - display_template "@tasks.actual_hours_worked@/@tasks.estimated_hours_work@ (@tasks.percent_complete@\%)" + display_template "@tasks.actual_hours_worked@/@tasks.estimated_hours_work@
(@tasks.percent_complete@\%)" } project_item_id { - label "P" - display_template "P" + label "Project" + display_col project_name + link_url_eval {[export_vars -base one {project_item_id $tasks(project_item_id)}]} } log_url { - label "L" + label "Log" display_template {L} } } \ @@ -264,7 +266,7 @@ } { set item_url [export_vars -base "task-one" {task_id}] - set log_url [export_vars -base "log" {{pm_task_id $task_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"] Index: openacs-4/contrib/packages/project-manager/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/admin/index.adp 11 Dec 2003 21:39:44 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/admin/index.adp 3 Jun 2004 21:32:15 -0000 1.4 @@ -1,44 +1,105 @@ - + -@project_term@s -@context;noquote@ + @title@ + @context;noquote@ -Click on one of the following items to set it up: + Click on one of the following items to set it up: -

+

- +
- - - - + + + + + - - - - + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + - - - - + + + + - - - - - -
Rolesthe roles people can take on projects and tasks, such as manager, sales contact, tech support person, etc..
SectionActionDescription
Default rolesthe default roles a person takes on projects and tasks.
RolesViewThe roles people can take on projects and tasks, such as + manager, sales contact, tech support person, etc.. Currently, + can only be edited directly in the database.
Manage workgroupsthe default roles a person takes on projects and tasks.
Default rolesViewThe data model has a facility for default roles, although + it is not currently used at all. This shows what is in the + database for default roles. Currently unimplemented.
WorkgroupsViewThere is a data model for workgroups, but it is not a part + of the UI. Shows what is in the database (currently, nothing!)
Dependency typesNo UIWhen implemented, this page will allow you to view and + edit the descriptions given to various dependency types (such + as finish before start, etc..) Currently, the only dependency + used is finish before start, so it's not exposed in the UI
Status typesNo UIValid status codes, for example, 'Open' and 'Closed'
Project categoriesEdit categoriesProjects can be categorized according to multiple 'trees' + of categories. What this means is you can have multiple ways + of categorizing your projects. This section sets up your + categories and allows you to link them to projects. Currently, + there is a bug in the categories package that prevents the + context bar at the top of the screen from returning you to the + project-manager pages.
Dependency type descriptionsthe description given to the user for task dependencies.
Logger integrationSet upLogger is a package that lets you log time, expenses, and + other variables. Project manager requires you to + install and mount at least one instance of logger, because it + uses logger to log time and other variables against projects + and tasks. However, you can have varying levels of integration + with logger. This section sets up which logger instances you + want to be fully integrated with project-manager, so that new + project-manager projects appear in the logger instance.

+ @logger_warning;noquote@ +

Status typestype valid status codes, for example, 'Open' and 'Closed'
Set upYou must choose on logger instance to be the primary + logger linked in with project-manager. This is closely linked + in with project-manager, so you can view reports of a project, etc. +

+ @logger_primary_warning;noquote@ +

Project categoriesthe categories for projects.
+ + Parameters + Edit + The parameters allow you to do things such as set up daily + reminder emails, change what fields are shown in the project + view and edit pages, and so on. Highly recommended if you're + setting up project-manager. + + + + Index: openacs-4/contrib/packages/project-manager/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/admin/index.tcl 26 Jan 2004 15:39:40 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/admin/index.tcl 3 Jun 2004 21:32:16 -0000 1.4 @@ -26,29 +26,43 @@ task_term_lower:onevalue project_term:onevalue project_term_lower:onevalue + logger_link:onevalue + logger_primary_link:onevalue } # --------------------------------------------------------------- # -# terminology -set task_term [parameter::get -parameter "TaskName" -default "Task"] -set task_term_lower [parameter::get -parameter "taskname" -default "task"] -set project_term [parameter::get -parameter "ProjectName" -default "Project"] -set project_term_lower [parameter::get -parameter "projectname" -default "project"] +set logger_URLs [parameter::get -parameter "LoggerURLsToKeepUpToDate" -default ""] +set logger_primary [parameter::get -parameter "LoggerPrimaryURL" -default ""] # set up context bar set context [list] +set title "Project Manager Administration" # the unique identifier for this package set package_id [ad_conn package_id] set user_id [ad_maybe_redirect_for_registration] -# set up link to categories +# set up links set categories_link "/categories/cadmin/one-object?object_id=$package_id" +set parameters_link "/shared/parameters?package_id=$package_id&return_url=[site_node::get_package_url -package_key project-manager]admin/" +set logger_link "logger" +set logger_primary_link "logger-primary" +if {[empty_string_p $logger_URLs]} { + set logger_warning "not set up" +} else { + set logger_warning "Currently integrated:

  • [join $logger_URLs "
  • "]
" +} +if {[empty_string_p $logger_primary]} { + set logger_primary_warning "not set up" +} else { + set logger_primary_warning "Currently selected:
  • $logger_primary
" +} + # permissions -permission::require_permission -party_id $user_id -object_id $package_id -privilege read +permission::require_permission -party_id $user_id -object_id $package_id -privilege admin set write_p [permission::permission_p -object_id $package_id -privilege write] set create_p [permission::permission_p -object_id $package_id -privilege create] Index: openacs-4/contrib/packages/project-manager/www/lib/entries-table-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/lib/Attic/entries-table-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/lib/entries-table-postgresql.xql 12 Mar 2004 13:44:46 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/lib/entries-table-postgresql.xql 3 Jun 2004 21:32:17 -0000 1.3 @@ -15,7 +15,7 @@ le.value, le.description, task.title as project_name, - submitter.user_id, + submitter.person_id as user_id, submitter.first_names || ' ' || submitter.last_name as user_name FROM logger_entries le @@ -32,11 +32,11 @@ ON le.entry_id = task.logger_entry, logger_projects lp, acs_objects ao, - acs_users_all submitter + persons submitter WHERE le.project_id = lp.project_id and ao.object_id = le.entry_id and - ao.creation_user = submitter.user_id + ao.creation_user = submitter.person_id [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"] ORDER BY $order_by Index: openacs-4/contrib/packages/project-manager/www/lib/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/lib/Attic/master.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/lib/master.adp 12 Mar 2004 13:44:47 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/lib/master.adp 3 Jun 2004 21:32:19 -0000 1.3 @@ -6,6 +6,7 @@ @header_stuff@ Index: openacs-4/contrib/packages/project-manager/www/lib/nav-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/lib/Attic/nav-bar.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/lib/nav-bar.adp 12 Mar 2004 13:44:47 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/lib/nav-bar.adp 3 Jun 2004 21:32:19 -0000 1.3 @@ -6,8 +6,10 @@ -  |  - @links.name@ +  |  + + @links.name@ +    Index: openacs-4/contrib/packages/project-manager/www/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/lib/Attic/nav-bar.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/lib/nav-bar.tcl 6 May 2004 18:48:00 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/lib/nav-bar.tcl 3 Jun 2004 21:32:19 -0000 1.4 @@ -4,6 +4,7 @@ set package_id [ad_conn package_id] set package_url [ad_conn package_url] set page_url [ad_conn url] +set logger_url [pm::util::logger_url] set admin_p [permission::permission_p -object_id $package_id -privilege admin] @@ -16,14 +17,18 @@ lappend link_list {} lappend link_list "Tasks" - lappend link_list [list "${package_url}index"] + lappend link_list [list "${package_url}"] lappend link_list {} lappend link_list "Projects" lappend link_list [list "${package_url}processes"] lappend link_list {} lappend link_list "Processes" + lappend link_list [list "${logger_url}?user_id=${user_id}"] + lappend link_list {} + lappend link_list "Logger" + lappend link_list [list "${package_url}task-select-project"] lappend link_list {} lappend link_list "New task" @@ -40,13 +45,15 @@ multirow create links name url selected_p foreach {url_list param_list label} $link_list { set selected_p 0 + foreach url $url_list { - set selected_p [logger::ui::navbar_link_selected_p $url $param_list] - if { $selected_p } { - break + + if {[string equal $page_url $url]} { + set selected_p 1 } } + if { ![empty_string_p $param_list] } { append url "?[export_vars $param_list]" }