Index: openacs-4/packages/workflow/tcl/case-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs-postgresql.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 18 Nov 2003 17:57:57 -0000 1.5
+++ openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 9 Jan 2004 15:47:53 -0000 1.6
@@ -5,17 +5,25 @@
select c.case_id,
+ c.top_case_id,
c.workflow_id,
- c.object_id,
+ top.object_id,
s.state_id,
s.short_name as state_short_name,
s.pretty_name as pretty_state,
- s.hide_fields as state_hide_fields
+ s.hide_fields as state_hide_fields,
+ parent.parent_enabled_action_id,
+ (select case_id
+ from workflow_case_enabled_actions
+ where enabled_action_id = parent.parent_enabled_action_id) as parent_case_id
from workflow_cases c,
+ workflow_cases top,
workflow_case_fsm cfsm left outer join
- workflow_fsm_states s on (s.state_id = cfsm.current_state)
+ workflow_fsm_states s on (s.state_id = cfsm.current_state) left outer join
+ workflow_case_parent_action parent using (case_id)
where c.case_id = :case_id
and cfsm.case_id = c.case_id
+ and top.case_id = c.top_case_id
@@ -63,8 +71,7 @@
- select a.action_id,
- extract(seconds from a.timeout) as timeout_seconds
+ select a.action_id
from workflow_cases c,
workflow_actions a
where c.case_id = :case_id