Index: openacs-4/contrib/packages/project-manager/tcl/calendar-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/calendar-procs-postgresql.xql,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/contrib/packages/project-manager/tcl/calendar-procs-postgresql.xql 13 Aug 2004 19:38:14 -0000 1.1.2.4
+++ openacs-4/contrib/packages/project-manager/tcl/calendar-procs-postgresql.xql 30 Aug 2004 18:19:13 -0000 1.1.2.5
@@ -10,50 +10,54 @@
- SELECT
- ts.task_id,
- ts.task_id as item_id,
- ts.task_number,
- t.task_revision_id,
- t.title,
- t.parent_id as project_item_id,
- 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,
- to_char(t.latest_finish,'J') as latest_finish_j,
- to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
- to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
- t.percent_complete,
- t.estimated_hours_work,
- t.estimated_hours_work_min,
- t.estimated_hours_work_max,
- case when t.actual_hours_worked is null then 0
- else t.actual_hours_worked end as actual_hours_worked,
- to_char(t.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start,
- to_char(t.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish,
- to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
- to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
- p.first_names || ' ' || p.last_name as full_name,
- p.person_id,
- s.status_type as status
- FROM
- pm_tasks_active ts,
- pm_task_status s,
- cr_items i,
- pm_tasks_revisionsx t
- LEFT JOIN pm_task_assignment ta
- ON t.item_id = ta.task_id
- LEFT JOIN persons p
- ON ta.party_id = p.person_id
- WHERE
- ts.status = s.status_id and
- ts.task_id = t.item_id and
- i.item_id = t.item_id and
- t.task_revision_id = i.live_revision and
+ SELECT
+ ts.task_id,
+ ts.task_id as item_id,
+ ts.task_number,
+ t.task_revision_id,
+ t.title,
+ t.parent_id as project_item_id,
+ 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,
+ to_char(t.latest_finish,'J') as latest_finish_j,
+ to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
+ to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
+ t.percent_complete,
+ t.estimated_hours_work,
+ t.estimated_hours_work_min,
+ t.estimated_hours_work_max,
+ case when t.actual_hours_worked is null then 0
+ else t.actual_hours_worked end as actual_hours_worked,
+ to_char(t.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start,
+ to_char(t.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish,
+ to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
+ to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
+ p.first_names || ' ' || p.last_name || ' (' ||
+ substring(r.one_line from 1 for 1) || ')' as full_name,
+ p.person_id,
+ s.status_type as status
+ FROM
+ pm_tasks_active ts,
+ pm_task_status s,
+ cr_items i,
+ pm_tasks_revisionsx t
+ LEFT JOIN pm_task_assignment ta
+ ON t.item_id = ta.task_id
+ LEFT JOIN persons p
+ ON ta.party_id = p.person_id
+ LEFT JOIN pm_roles r
+ ON ta.role_id = r.role_id
+ WHERE
+ ts.status = s.status_id and
+ ts.task_id = t.item_id and
+ i.item_id = t.item_id and
+ t.task_revision_id = i.live_revision and
t.latest_start >= :first_of_month_date and
t.latest_start <= :last_of_month_date
+ $hide_closed_clause
ORDER BY
- t.latest_start, ts.task_id, p.first_names, p.last_name
+ t.latest_start, ts.task_id, r.role_id, p.first_names, p.last_name
Index: openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/calendar-procs.tcl,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 13 Aug 2004 19:38:14 -0000 1.1.2.4
+++ openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 30 Aug 2004 18:19:13 -0000 1.1.2.5
@@ -17,6 +17,7 @@
ad_proc -public one_month_display {
{-user_id:required}
{-date ""}
+ {-hide_closed_p "t"}
} {
Creates a month widget for tasks
} {
@@ -36,6 +37,13 @@
set last_of_month_date "$year-$month-[dt_num_days_in_month $year $month]"
set items [ns_set create]
+
+ # do not show closed items if the user requests not to
+ if {[string is true $hide_closed_p]} {
+ set hide_closed_clause " and s.status_type = 'o' "
+ } else {
+ set hide_closed_clause ""
+ }
set last_task_id ""
set assignee_list [list]
@@ -76,14 +84,16 @@
# begin setting up this calendar item
set day_details "
${detail_begin}$task_id $title${detail_end}"
+ # only add to the list if we want to see closed tasks
append day_details "
${font_begin}${full_name}${font_end}
"
-
+
}
set last_task_id $task_id
}
if {![empty_string_p $last_task_id ]} {
+
ns_set put $items $latest_start_j "$day_details