Index: openacs-4/packages/xowf/tcl/xowf-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-procs.tcl,v diff -u -r1.28.2.28 -r1.28.2.29 --- openacs-4/packages/xowf/tcl/xowf-procs.tcl 21 Mar 2020 09:34:05 -0000 1.28.2.28 +++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 25 Mar 2020 16:23:17 -0000 1.28.2.29 @@ -2060,22 +2060,34 @@ return [array names visited] } - WorkflowPage ad_instproc get_revision_sets {} { + WorkflowPage ad_instproc get_revision_sets {-with_instance_attributes:switch} { Return a list of ns_sets containing revision_id, creation_date, creation_user, creation_ip, and state for the current workflow instance. } { set item_id ${:item_id} - set revision_sets [::xo::dc sets -prepare integer wf_revisions { - SELECT revision_id, creation_date, creation_user, creation_ip, state, assignee - FROM cr_revisions cr, acs_objects o, xowiki_form_page x - WHERE cr.item_id = :item_id - AND o.object_id = cr.revision_id - AND x.xowiki_form_page_id = cr.revision_id - ORDER BY cr.revision_id ASC - }] + if {$with_instance_attributes} { + set revision_sets [::xo::dc sets -prepare integer wf_revisions { + SELECT revision_id, creation_date, creation_user, creation_ip, state, assignee, instance_attributes + FROM cr_revisions cr, acs_objects o, xowiki_form_page x, xowiki_page_instance pi + WHERE cr.item_id = :item_id + AND o.object_id = cr.revision_id + AND x.xowiki_form_page_id = cr.revision_id + AND pi.page_instance_id = cr.revision_id + ORDER BY cr.revision_id ASC + }] + } else { + set revision_sets [::xo::dc sets -prepare integer wf_revisions { + SELECT revision_id, creation_date, creation_user, creation_ip, state, assignee + FROM cr_revisions cr, acs_objects o, xowiki_form_page x + WHERE cr.item_id = :item_id + AND o.object_id = cr.revision_id + AND x.xowiki_form_page_id = cr.revision_id + ORDER BY cr.revision_id ASC + }] + } return $revision_sets }