Index: openacs-4/packages/project-manager/catalog/project-manager.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/catalog/project-manager.de_DE.ISO-8859-1.xml,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/catalog/project-manager.de_DE.ISO-8859-1.xml 8 Jun 2005 20:54:19 -0000 1.3 +++ openacs-4/packages/project-manager/catalog/project-manager.de_DE.ISO-8859-1.xml 10 Jun 2005 19:21:14 -0000 1.4 @@ -5,6 +5,7 @@ Aktion Aktionen Hinzuf�gen + Einen Prozess hinzuf�gen Einen Prozess (bestehend aus mehreren einzelnen Aufgaben) hinzuf�gen Eine Aufgabe hinzuf�gen Prozess hinzuf�gen @@ -33,6 +34,7 @@ Tage gearbeitet Abgabetermin: Abgabetermin + Abgabezeit Vordefinierte Rollen L�schen Abh�ngigkeiten @@ -59,6 +61,9 @@ Sp�testes Ende Fr�hester Start Sp�tester Beginn + Lead + Paket Instanzen verlinken + Verbindungen (Linking) Stundenlog Aufwandserfassung Eintrag: Erfasste Variablen @@ -81,6 +86,7 @@ Verbliebende Stunden: %task_info.hours_remaining% Wenn JA, dann hat dieses Projekt keinen Abgabetermin @import "%package_url%style-logger.css"; @import "%package_url%style.css"; + Diese Seite erlaubt es Ihnen, andere Paket-Instanzen mit diesem Projekt Manager zu verbinden. Die Aufwandserfassung ist ein Package, das es Ihnen erlaubt, die in dem Projekt geleisteten Stunden, Kosten etc. zu erfassen. Die Aufwandserfassung ist ein Package, das es Ihnen erlaubt, die in dem Projekt geleisteten Stunden, Kosten etc. zu erfassen. &nbsp;%num.rownum%&nbsp;&nbsp; @@ -130,17 +136,20 @@ Min.: name &nbsp;&nbsp;%project_term% + Neuer Prozess Neues %project_term% Kein User Interface Jetzt # + Anzahl der neuen Aufgaben Ein Prozess laufend Offen Reihenfolge Seite) Parameter Prozent Fertig + Vertr. Prozess Aufgaben: Prozess Aufgaben Prozesse @@ -182,6 +191,7 @@ Aufgabe Aufgabe Aufgaben Kalender + Aufgaben Kalender Aufgaben Kategorien Aufgaben�nderung Aufgabe, erfasste Stunden @@ -201,6 +211,7 @@ Optionen ansehen Projekt�nderungen ansehen Aufgaben�nderungen ansehen + �bernommen durch Wer Arbeit Notwendige Arbeit: 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.9 -r1.10 --- openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 8 Jun 2005 20:54:19 -0000 1.9 +++ openacs-4/packages/project-manager/catalog/project-manager.en_US.ISO-8859-1.xml 10 Jun 2005 19:21:14 -0000 1.10 @@ -11,6 +11,11 @@ Action Actions Active tasks + Actual end date + Actual end dates + Actual hours worked + Actual start date + Actual start dates Add Add subproject Add a Process @@ -28,6 +33,7 @@ Added: Added: %new% Admin + Assign from categories %assign% removed %assign% saved Assignee @@ -69,6 +75,7 @@ Days worked Deadline: Deadline + Deadline Time Default roles Delete Delete: %one_line% @@ -86,10 +93,15 @@ Description changed Done. Done + Dynamic Form + Dynamic Forms Earliest Finish Earliest finish + Earliest finish date Earliest Start Earliest start + Earliest start date + Earliest start dates Edit Edit assignees Edit a Process @@ -101,12 +113,15 @@ Edit tasks Edit this role EF + End date + End dates Enhanced Text Error ES Estimated Hours Estimated Hours (Max) Estimated Hours (Min) + Estimated hours work Fixed-width Text Format: Go @@ -124,9 +139,13 @@ Key Latest Finish Latest finish + Latest finish date + Latest finish dates Latest Start Latest start Latest start: + Latest start date + Latest start dates Lead LF Link package instances @@ -156,6 +175,7 @@ project-manager projects appear in the logger instance. A person interested in developments, possibly helping out on it. A person on the team responsible for completion of the project + Actual hours completed Add a comment to: %title% Add a process %task_term_lower% Add a process %task_term_lower% (assignment) @@ -187,6 +207,7 @@ Dependency changed <i>from</i> %old% (%old_dependency%) <i>to</i> %new% (%new_dependency%) depends on another %task_term_lower% done with project update page (finally!) + Earliest finish dates Edit a process %task_term_lower% Edit a %project_term_lower% Edit a %task_term_lower% @@ -196,6 +217,11 @@ Enter 100% to close the %task_term_lower%, or less to open it. Enter 100% to close the %task_term_lower%, or less to open it. Enter a number for ordering the priority. 0 is the default and also the lowest priority. + Estimated finish date + Estimated finish dates + Estimated hours total + Estimated maximum hours + Estimated minimum hours Finishes before this starts Finishes before this finishes For new tasks, a project must be passed in @@ -207,6 +233,8 @@ @import "%package_url%style.css"; Last <input type="text" name="logger_days" value="%logger_days%" size="5" /> Days This page allows you to link other package instances to this project manager + Linked logger project + Linked logger projects Log time for multiple tasks Logger is a package that lets you log time, expenses, and other . Project manager requires you to @@ -392,10 +420,16 @@ Party ID Percent Complete\ Percent complete + Percents complete Plain Text + Planned end date + Planned end dates + Planned start date + Planned start dates Player Please wait... Pressing Tasks + Priorities Priority: Priority Process @@ -415,16 +449,22 @@ Project Project categories Project Changes + Project code + Project codes + Project goal + Project goals Project information Project is ongoing? Project missing Project name + Project ongoing Project Search: Project Search term %project_term;noquote%s %project_term%s Projection Projects + Projects ongoing Quantity: Related %task_term%s myself Index: openacs-4/packages/project-manager/lib/projects.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/projects.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/lib/projects.tcl 10 Jun 2005 19:06:37 -0000 1.3 +++ openacs-4/packages/project-manager/lib/projects.tcl 10 Jun 2005 19:21:14 -0000 1.4 @@ -122,13 +122,13 @@ } if {$bulk_p == 1} { - set bulk_actions [list "[_ project-manager.Close]" "@{base_url}/bulk-close" "[_ project-manager.Close_project]"] + set bulk_actions [list "[_ project-manager.Close]" "@{base_url}bulk-close" "[_ project-manager.Close_project]"] } else { set bulk_actions [list] } if {$actions_p == 1} { - set actions [list "[_ project-manager.Add_project]" "${base_url}/add-edit" "[_ project-manager.Add_project]" "[_ project-manager.Customers]" "[site_node::get_package_url -package_key contacts]" "[_ project-manager.View_customers]"] + set actions [list "[_ project-manager.Add_project]" "${base_url}add-edit" "[_ project-manager.Add_project]" "[_ project-manager.Customers]" "[site_node::get_package_url -package_key contacts]" "[_ project-manager.View_customers]"] } else { set actions [list] } @@ -250,7 +250,7 @@ db_multirow -extend { item_url } projects project_folders { } { - set item_url [export_vars -base "${base_url}/one" {project_item_id}] + set item_url [export_vars -base "${base_url}one" {project_item_id}] } # ------------------------- END OF FILE ------------------------- # Index: openacs-4/packages/project-manager/tcl/install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/install-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/project-manager/tcl/install-procs.tcl 7 Jun 2005 11:04:07 -0000 1.10 +++ openacs-4/packages/project-manager/tcl/install-procs.tcl 10 Jun 2005 19:21:14 -0000 1.11 @@ -1,7 +1,7 @@ ad_library { Project manager install library - + Procedures that deal with installing, instantiating, mounting. @creation-date 2003-01-31 @@ -14,54 +14,63 @@ ad_proc -private pm::install::package_install { } { - Package install callback proc. + Package install callback proc. } { - ## Create pm_project - dtype::create -name {pm_project} -supertype {content_revision} -pretty_name {Project} -pretty_plural {Projects} -table_name {pm_projects} -id_column {project_id} - content::type::attribute::new -content_type {pm_project} -attribute_name {project_code} -datatype {string} -pretty_name {Project code} -pretty_plural {Project codes} -column_spec {varchar(255)} - content::type::attribute::new -content_type {pm_project} -attribute_name {goal} -datatype {string} -pretty_name {Project goal} -pretty_plural {Project goals} -column_spec {varchar(4000)} - content::type::attribute::new -content_type {pm_project} -attribute_name {planned_start_date} -datatype {date} -pretty_name {Planned start date} -pretty_plural {Planned start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {planned_end_date} -datatype {date} -pretty_name {Planned end date} -pretty_plural {Planned end dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_start_date} -datatype {date} -pretty_name {Actual start date} -pretty_plural {Actual start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_end_date} -datatype {date} -pretty_name {Actual end date} -pretty_plural {Actual end dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {status_id} -datatype {integer} -pretty_name {Status} -pretty_plural {Status} -column_spec {integer} - content::type::attribute::new -content_type {pm_project} -attribute_name {ongoing_p} -datatype {string} -pretty_name {Project ongoing} -pretty_plural {Projects ongoing} -column_spec {char(1)} - content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_finish_date} -datatype {date} -pretty_name {Estimated finish date} -pretty_plural {Estimated finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {earliest_finish_date} -datatype {date} -pretty_name {Earliest finish date} -pretty_plural {Earliest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {latest_finish_date} -datatype {date} -pretty_name {Latest finish date} -pretty_plural {Latest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_hours_completed} -datatype {number} -pretty_name {Actual hours completed} -pretty_plural {Actual hours completed} -column_spec {numeric} - content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_hours_total} -datatype {number} -pretty_name {Estimated hours total} -pretty_plural {Estimated hours total} -column_spec {numeric} - content::type::attribute::new -content_type {pm_project} -attribute_name {customer_id} -datatype {integer} -pretty_name {Customer} -pretty_plural {Customers} -column_spec {integer} - content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)} - ## Create pm_task - dtype::create -name {pm_task} -supertype {content_revision} -pretty_name {Task} -pretty_plural {Tasks} -table_name {pm_tasks_revisions} -id_column {task_revision_id} - content::type::attribute::new -content_type {pm_task} -attribute_name {end_date} -datatype {date} -pretty_name {End date} -pretty_plural {End dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_task} -attribute_name {percent_complete} -datatype {number} -pretty_name {Percent complete} -pretty_plural {Percents complete} -column_spec {numeric} - content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work} -datatype {number} -pretty_name {Estimated hours work} -pretty_plural {Estimated hours work} -column_spec {numeric} - content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work_min} -datatype {number} -pretty_name {Estimated minimum hours} -pretty_plural {Estimated minimum hours} -column_spec {numeric} - content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work_max} -datatype {number} -pretty_name {Estimated maximum hours} -pretty_plural {Estimated maximum hours} -column_spec {numeric} - content::type::attribute::new -content_type {pm_task} -attribute_name {actual_hours_worked} -datatype {number} -pretty_name {Actual hours worked} -pretty_plural {Actual hours worked} -column_spec {numeric} - content::type::attribute::new -content_type {pm_task} -attribute_name {earliest_start} -datatype {date} -pretty_name {Earliest start date} -pretty_plural {Earliest start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_task} -attribute_name {earliest_finish} -datatype {date} -pretty_name {Earliest finish date} -pretty_plural {Earliest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_task} -attribute_name {latest_start} -datatype {date} -pretty_name {Latest start date} -pretty_plural {Latest start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_task} -attribute_name {latest_finish} -datatype {date} -pretty_name {Latest finish date} -pretty_plural {Latest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_task} -attribute_name {priority} -datatype {integer} -pretty_name {Priority} -pretty_plural {Priorities} -column_spec {integer} - content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)} + # Create pm_project + dtype::create -name {pm_project} -supertype {content_revision} -pretty_name {[_ project-manager.Project_1]} -pretty_plural {[_ project-manager.Projects]} -table_name {pm_projects} -id_column {project_id} + content::type::attribute::new -content_type {pm_project} -attribute_name {project_code} -datatype {string} -pretty_name {[_ project-manager.Project_code]} -pretty_plural {[_ project-manager.Project_codes]} -column_spec {varchar(255)} + content::type::attribute::new -content_type {pm_project} -attribute_name {goal} -datatype {string} -pretty_name {[_ project-manager.Project_goal]} -pretty_plural {[_ project-manager.Project_goals]} -column_spec {varchar(4000)} + content::type::attribute::new -content_type {pm_project} -attribute_name {planned_start_date} -datatype {date} -pretty_name {[_ project-manager.Planned_start_date]} -pretty_plural {[_ project-manager.Planned_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {planned_end_date} -datatype {date} -pretty_name {[_ project-manager.Planned_end_date]} -pretty_plural {[_ project-manager.Planned_end_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_start_date} -datatype {date} -pretty_name {[_ project-manager.Actual_start_date]} -pretty_plural {[_ project-manager.Actual_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_end_date} -datatype {date} -pretty_name {[_ project-manager.Actual_end_date]} -pretty_plural {[_ project-manager.Actual_end_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {status_id} -datatype {integer} -pretty_name {[_ project-manager.Status_1]} -pretty_plural {[_ project-manager.Status_1]} -column_spec {integer} + content::type::attribute::new -content_type {pm_project} -attribute_name {ongoing_p} -datatype {string} -pretty_name {[_ project-manager.Project_ongoing]} -pretty_plural {[_ project-manager.Projects_ongoing]} -column_spec {char(1)} + content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_finish_date} -datatype {date} -pretty_name {[_ project-manager.lt_Estimated_finish_date]} -pretty_plural {[_ project-manager.lt_Estimated_finish_date_1]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {earliest_finish_date} -datatype {date} -pretty_name {[_ project-manager.Earliest_finish_date]} -pretty_plural {[_ project-manager.lt_Earliest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {latest_finish_date} -datatype {date} -pretty_name {[_ project-manager.Latest_finish_date]} -pretty_plural {[_ project-manager.Latest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_hours_completed} -datatype {number} -pretty_name {[_ project-manager.lt_Actual_hours_complete]} -pretty_plural {[_ project-manager.lt_Actual_hours_complete]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_hours_total} -datatype {number} -pretty_name {[_ project-manager.lt_Estimated_hours_total]} -pretty_plural {[_ project-manager.lt_Estimated_hours_total]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_project} -attribute_name {customer_id} -datatype {integer} -pretty_name {[_ project-manager.Customer]} -pretty_plural {[_ project-manager.Customers]} -column_spec {integer} + content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {[_ project-manager.Dynamic_Form]} -pretty_plural {[_ project-manager.Dynamic_Forms]} -column_spec {varchar(100)} + + # Create pm_task + + dtype::create -name {pm_task} -supertype {content_revision} -pretty_name {[_ project-manager.Task]} -pretty_plural {[_ project-manager.Tasks]} -table_name {pm_tasks_revisions} -id_column {task_revision_id} + content::type::attribute::new -content_type {pm_task} -attribute_name {end_date} -datatype {date} -pretty_name {[_ project-manager.End_date]} -pretty_plural {[_ project-manager.End_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_task} -attribute_name {percent_complete} -datatype {number} -pretty_name {[_ project-manager.Percent_complete]} -pretty_plural {[_ project-manager.Percents_complete]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work} -datatype {number} -pretty_name {[_ project-manager.Estimated_hours_work]} -pretty_plural {[_ project-manager.Estimated_hours_work]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work_min} -datatype {number} -pretty_name {[_ project-manager.lt_Estimated_minimum_hou]} -pretty_plural {[_ project-manager.lt_Estimated_minimum_hou]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_task} -attribute_name {estimated_hours_work_max} -datatype {number} -pretty_name {[_ project-manager.lt_Estimated_maximum_hou]} -pretty_plural {[_ project-manager.lt_Estimated_maximum_hou]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_task} -attribute_name {actual_hours_worked} -datatype {number} -pretty_name {[_ project-manager.Actual_hours_worked]} -pretty_plural {[_ project-manager.Actual_hours_worked]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_task} -attribute_name {earliest_start} -datatype {date} -pretty_name {[_ project-manager.Earliest_start_date]} -pretty_plural {[_ project-manager.Earliest_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_task} -attribute_name {earliest_finish} -datatype {date} -pretty_name {[_ project-manager.Earliest_finish_date]} -pretty_plural {[_ project-manager.lt_Earliest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_task} -attribute_name {latest_start} -datatype {date} -pretty_name {[_ project-manager.Latest_start_date]} -pretty_plural {[_ project-manager.Latest_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_task} -attribute_name {latest_finish} -datatype {date} -pretty_name {[_ project-manager.Latest_finish_date]} -pretty_plural {[_ project-manager.Latest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_task} -attribute_name {priority} -datatype {integer} -pretty_name {[_ project-manager.Priority_1]} -pretty_plural {[_ project-manager.Priorities]} -column_spec {integer} + content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {[_ project-manager.Dynamic_Form]} -pretty_plural {[_ project-manager.Dynamic_Forms]} -column_spec {varchar(100)} + # Create new relationship type for Application Links + rel_types::new "application_link" "Application Link" "Application Links" apm_package 0 "" apm_package 0 "" rel_types::new "application_data_link" "Application Data Link" "Application Data Links" acs_object 0 "" acs_object 0 "" } ad_proc -private pm::install::package_instantiate { {-package_id:required} } { - Package instantiation callback proc. + Package instantiation callback proc. } { + # create a content folder - set folder_id [content::folder::new -name "project_manager_$package_id" -package_id $package_id ] + + set folder_id [content::folder::new \ + -name "project_manager_$package_id" -package_id $package_id] + # register the allowed content types for a folder + content::folder::register_content_type -folder_id $folder_id -content_type {pm_project} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {pm_task} -include_subtypes t } @@ -71,12 +80,13 @@ } { Package un-instantiation callback proc } { + # Delete the project repository - # ns_log Debug "pm::install::package_uninstantiate getting folder_id for package_id: $package_id" - # set folder_id [db_exec_plsql get_folder_id { }] - # ns_log Debug "pm::install::package_uninstantiate delete folder_id: $folder_id" - # db_exec_plsql delete_root_folder { } + # ns_log Debug "pm::install::package_uninstantiate getting folder_id + # for package_id: $package_id" set folder_id [db_exec_plsql + # get_folder_id {}] ns_log Debug "pm::install::package_uninstantiate + # delete folder_id: $folder_id" db_exec_plsql delete_root_folder {} } ad_proc -public -callback pm::project_new { @@ -145,17 +155,18 @@ db_1row get_watcher_role { select role_id from pm_roles - where one_line = :role - } + where one_line = :role} # get linked projects to folder - foreach project_item_id [application_data_link::get_linked -from_object_id $linked_id -to_object_type "pm_project"] { + + foreach project_item_id [application_data_link::get_linked \ + -from_object_id $linked_id \ + -to_object_type "pm_project"] { db_1row pm_package_id { select package_id as pm_package_id from acs_objects - where object_id = :project_item_id - } - + where object_id = :project_item_id} + set task_id [pm::task::new \ -project_id $project_item_id \ -title $title \ @@ -166,7 +177,8 @@ -package_id $pm_package_id \ -no_callback] - set task_item_id [pm::task::get_item_id -task_id $task_id] + set task_item_id [pm::task::get_item_id \ + -task_id $task_id] pm::task::assign \ -task_item_id $task_item_id \ @@ -183,7 +195,9 @@ } { create a new task for each new forum message } { + # make sure this is not a reply message + forum::message::get -message_id $message_id -array message if {$message_id == $message(root_message_id)} { pm::link_new_tasks -object_id $message_id -linked_id $message(forum_id) -role "Watcher" -title $message(subject) @@ -200,8 +214,7 @@ select i.parent_id as folder_id, r.title, r.description, r.mime_type from cr_items i, cr_revisions r where i.item_id = :file_id - and r.revision_id = i.latest_revision - } + and r.revision_id = i.latest_revision} pm::link_new_tasks -object_id $file_id -linked_id $folder_id -role "Watcher" -title $title -description $description -mime_type $mime_type } @@ -216,8 +229,7 @@ select i.parent_id as folder_id, r.title, r.description, r.mime_type from cr_items i, cr_revisions r where i.item_id = :file_id - and r.revision_id = i.latest_revision - } + and r.revision_id = i.latest_revision} pm::link_new_tasks -object_id $file_id -linked_id $folder_id -role "Watcher" -title $title -description $description -mime_type $mime_type } @@ -229,8 +241,10 @@ } { If organisation, ask to create new project } { - if { [llength [application_link::get_linked -from_package_id $package_id -to_package_key "project-manager"]] > 0 } { - if { $object_type != "person" } { + if {[llength [application_link::get_linked \ + -from_package_id $package_id \ + -to_package_key "project-manager"]] > 0} { + if {$object_type != "person" } { ad_form -extend -name $form -form { {create_project_p:text(radio) \ {label "[_ project-manager.create_project]"} \ @@ -250,18 +264,20 @@ } { create a new project for new organization } { - if { $object_type != "person" } { + if {$object_type != "person" } { upvar create_project_p create_project_p - if {[exists_and_not_null create_project_p] && $create_project_p == "t"} { + if {[exists_and_not_null create_project_p] + && $create_project_p == "t"} { db_1row organisation_data { select o.name, ao.creation_user, ao.creation_ip from organizations o, acs_objects ao where o.organization_id = :contact_id - and ao.object_id = o.organization_id - } + and ao.object_id = o.organization_id} - foreach pm_package_id [application_link::get_linked -from_package_id $package_id -to_package_key "project-manager"] { + foreach pm_package_id [application_link::get_linked \ + -from_package_id $package_id \ + -to_package_key "project-manager"] { set project_id [pm::project::new \ -project_name $name \ -status_id 1 \ @@ -270,9 +286,11 @@ -creation_ip $creation_ip \ -package_id $pm_package_id] - set project_item_id [pm::project::get_project_item_id -project_id $project_id] + set project_item_id [pm::project::get_project_item_id \ + -project_id $project_id] application_data_link::new -this_object_id $contact_id -target_object_id $project_item_id + } } } @@ -288,22 +306,22 @@ -spec { 2.72a1 3.0d1 { db_transaction { - content::type::attribute::new -content_type {pm_project} -attribute_name {project_code} -datatype {string} -pretty_name {Project code} -pretty_plural {Project codes} -column_spec {varchar(255)} - content::type::attribute::new -content_type {pm_project} -attribute_name {goal} -datatype {string} -pretty_name {Project goal} -pretty_plural {Project goals} -column_spec {varchar(4000)} - content::type::attribute::new -content_type {pm_project} -attribute_name {planned_start_date} -datatype {date} -pretty_name {Planned start date} -pretty_plural {Planned start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {planned_end_date} -datatype {date} -pretty_name {Planned end date} -pretty_plural {Planned end dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_start_date} -datatype {date} -pretty_name {Actual start date} -pretty_plural {Actual start dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_end_date} -datatype {date} -pretty_name {Actual end date} -pretty_plural {Actual end dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {status_id} -datatype {integer} -pretty_name {Status} -pretty_plural {Status} -column_spec {integer} - content::type::attribute::new -content_type {pm_project} -attribute_name {ongoing_p} -datatype {string} -pretty_name {Project ongoing} -pretty_plural {Projects ongoing} -column_spec {char(1)} - content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_finished_date} -datatype {date} -pretty_name {Estimated finish date} -pretty_plural {Estimated finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {earliest_finish_date} -datatype {date} -pretty_name {Earliest finish date} -pretty_plural {Earliest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {latest_finish_date} -datatype {date} -pretty_name {Latest finish date} -pretty_plural {Latest finish dates} -column_spec {timestamptz} - content::type::attribute::new -content_type {pm_project} -attribute_name {actual_hours_completed} -datatype {number} -pretty_name {Actual hours completed} -pretty_plural {Actual hours completed} -column_spec {numeric} - content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_hours_total} -datatype {number} -pretty_name {Estimated hours total} -pretty_plural {Estimated hours total} -column_spec {numeric} - content::type::attribute::new -content_type {pm_project} -attribute_name {logger_project} -datatype {integer} -pretty_name {Linked logger project} -pretty_plural {Linked logger projects} -column_spec {integer} + content::type::attribute::new -content_type {pm_project} -attribute_name {project_code} -datatype {string} -pretty_name {[_ project-manager.Project_code]} -pretty_plural {[_ project-manager.Project_codes]} -column_spec {varchar(255)} + content::type::attribute::new -content_type {pm_project} -attribute_name {goal} -datatype {string} -pretty_name {[_ project-manager.Project_goal]} -pretty_plural {[_ project-manager.Project_goals]} -column_spec {varchar(4000)} + content::type::attribute::new -content_type {pm_project} -attribute_name {planned_start_date} -datatype {date} -pretty_name {[_ project-manager.Planned_start_date]} -pretty_plural {[_ project-manager.Planned_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {planned_end_date} -datatype {date} -pretty_name {[_ project-manager.Planned_end_date]} -pretty_plural {[_ project-manager.Planned_end_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_start_date} -datatype {date} -pretty_name {[_ project-manager.Actual_start_date]} -pretty_plural {[_ project-manager.Actual_start_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_end_date} -datatype {date} -pretty_name {[_ project-manager.Actual_end_date]} -pretty_plural {[_ project-manager.Actual_end_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {status_id} -datatype {integer} -pretty_name {[_ project-manager.Status_1]} -pretty_plural {[_ project-manager.Status_1]} -column_spec {integer} + content::type::attribute::new -content_type {pm_project} -attribute_name {ongoing_p} -datatype {string} -pretty_name {[_ project-manager.Project_ongoing]} -pretty_plural {[_ project-manager.Projects_ongoing]} -column_spec {char(1)} + content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_finished_date} -datatype {date} -pretty_name {[_ project-manager.lt_Estimated_finish_date]} -pretty_plural {[_ project-manager.lt_Estimated_finish_date_1]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {earliest_finish_date} -datatype {date} -pretty_name {[_ project-manager.Earliest_finish_date]} -pretty_plural {[_ project-manager.lt_Earliest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {latest_finish_date} -datatype {date} -pretty_name {[_ project-manager.Latest_finish_date]} -pretty_plural {[_ project-manager.Latest_finish_dates]} -column_spec {timestamptz} + content::type::attribute::new -content_type {pm_project} -attribute_name {actual_hours_completed} -datatype {number} -pretty_name {[_ project-manager.lt_Actual_hours_complete]} -pretty_plural {[_ project-manager.lt_Actual_hours_complete]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_project} -attribute_name {estimated_hours_total} -datatype {number} -pretty_name {[_ project-manager.lt_Estimated_hours_total]} -pretty_plural {[_ project-manager.lt_Estimated_hours_total]} -column_spec {numeric} + content::type::attribute::new -content_type {pm_project} -attribute_name {logger_project} -datatype {integer} -pretty_name {[_ project-manager.lt_Linked_logger_project]} -pretty_plural {[_ project-manager.lt_Linked_logger_project_1]} -column_spec {integer} - content::type::attribute::new -content_type {pm_task} -attribute_name {priority} -datatype {integer} -pretty_name {Priority} -pretty_plural {Priorities} -column_spec {integer} + content::type::attribute::new -content_type {pm_task} -attribute_name {priority} -datatype {integer} -pretty_name {[_ project-manager.Priority_1]} -pretty_plural {[_ project-manager.Priorities]} -column_spec {integer} } } @@ -317,8 +335,8 @@ content::type::attribute::delete -content_type {pm_project} -attribute_name {logger_project} } 3.0d4 3.0d5 { - content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)} - content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {Dynamic Form} -pretty_plural {Dynamic Forms} -column_spec {varchar(100)} + content::type::attribute::new -content_type {pm_project} -attribute_name {dform} -datatype {string} -pretty_name {[_ project-manager.Dynamic_Form]} -pretty_plural {[_ project-manager.Dynamic_Forms]} -column_spec {varchar(100)} + content::type::attribute::new -content_type {pm_task} -attribute_name {dform} -datatype {string} -pretty_name {[_ project-manager.Dynamic_Form]} -pretty_plural {[_ project-manager.Dynamic_Forms]} -column_spec {varchar(100)} } } } 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.4 -r1.5 --- openacs-4/packages/project-manager/www/project-assign-edit.tcl 26 May 2005 09:34:29 -0000 1.4 +++ openacs-4/packages/project-manager/www/project-assign-edit.tcl 10 Jun 2005 19:21:15 -0000 1.5 @@ -22,6 +22,11 @@ # The id of the person logged in and browsing this page set user_id [ad_maybe_redirect_for_registration] +# We want to assign people based on one or more categories. For this a +# new page should be made available to add users based on categories. + +set project_assign_categories_url [export_vars -base project-assign-from-categories {project_item_id return_url}] + # permissions permission::require_permission -party_id $user_id -object_id $project_item_id -privilege write @@ -61,6 +66,8 @@ set assigned($party_id-$role_id) 1 } +set contact_id [application_data_link::get_linked -from_object_id $party_id -to_object_type "content_item"] + set assignee_list_of_lists [db_list_of_lists get_assignees { select distinct p.first_names || ' ' || p.last_name as name, @@ -106,6 +113,9 @@ } + # Add the list of Employees from the customer as well if they are + # not already in the list above. + append html "" }