Index: openacs-4/packages/cms/www/modules/workflow/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/workflow/index.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/cms/www/modules/workflow/index.tcl 24 May 2001 23:57:17 -0000 1.2 +++ openacs-4/packages/cms/www/modules/workflow/index.tcl 22 Aug 2002 03:04:32 -0000 1.3 @@ -7,104 +7,16 @@ # workflow totals -template::query get_stats wf_stats onerow " - select - count( decode(content_workflow.is_finished(c.case_id, transition_key), - 'f',1,null) - ) as total_count, - count( decode(content_workflow.is_overdue(c.case_id, transition_key), - 't',1,null) - ) as overdue_count, - count( decode(content_workflow.is_active(c.case_id, transition_key), - 't',1,null) - ) as active_count, - count( decode(content_workflow.is_checked_out(c.case_id, transition_key), - 't',1,null) - ) as checkout_count - from - wf_cases c, wf_transitions trans - where - c.workflow_key = trans.workflow_key - and - c.workflow_key = 'publishing_wf' - and - c.state = 'active' -" +db_1row get_stats "" - # workflow tasks by transition state: content items, overdue items -template::query get_transitions transitions multirow " - select - trans.transition_key, transition_name, sort_order, - count(transition_name) as transition_count, - count(decode ( - content_workflow.is_overdue(c.case_id, trans.transition_key), - 't',1,null) - ) as overdue_count, - count(decode ( - content_workflow.is_active(c.case_id, trans.transition_key), - 't',1,null) - ) as active_count, - count( decode( - content_workflow.is_checked_out(c.case_id, trans.transition_key), - 't',1,null) - ) as checkout_count - from - wf_cases c, wf_transitions trans - where - trans.workflow_key = c.workflow_key - and - trans.workflow_key = 'publishing_wf' - and - c.state in ('active') - and - -- don't include tasks that have been finished or canceled - content_workflow.is_finished(c.case_id, trans.transition_key) = 'f' - group by - sort_order, transition_name, trans.transition_key -" +db_multirow transitions get_transitions "" # workflow tasks by user: content items, overdue items -template::query get_user_tasks user_tasks multirow " - select - p.person_id, p.first_names, p.last_name, - count(transition_name) as transition_count, - count(decode ( - content_workflow.is_overdue(c.case_id, t.transition_key), - 't',1,null) - ) as overdue_count, - count(decode ( - content_workflow.is_active(c.case_id, t.transition_key), - 't',1,null) - ) as active_count, - count( decode( - content_workflow.is_checked_out(c.case_id, t.transition_key, ca.party_id), - 't',1,null) - ) as checkout_count - from - wf_cases c, wf_case_assignments ca, - wf_transitions t, persons p - where - t.workflow_key = 'publishing_wf' - and - t.workflow_key = c.workflow_key - and - c.state = 'active' - and - c.case_id = ca.case_id - and - ca.transition_key = t.transition_key - and - p.person_id = ca.party_id - and - -- don't include tasks that have been finished or canceled - content_workflow.is_finished(c.case_id, t.transition_key) = 'f' - group by - first_names, last_name, person_id -" +db_multirow user_tasks get_user_tasks "" set page_title "Workflow Statistics"