Index: openacs-4/packages/workflow/tcl/case-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.tcl,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/workflow/tcl/case-procs.tcl 13 Jan 2004 12:36:47 -0000 1.23
+++ openacs-4/packages/workflow/tcl/case-procs.tcl 22 Jan 2004 09:53:20 -0000 1.24
@@ -1258,6 +1258,24 @@
workflow::case::role::flush_cache -case_id $case_id
}
+ad_proc -public workflow::case::role::assignee_remove {
+ {-case_id:required}
+ {-role_id:required}
+ {-party_id:required}
+} {
+ Remove an assignee from this role
+
+ @param case_id the ID of the case.
+ @param role_id the ID of the role to remove the assignee from.
+ @param party_id the ID of party to remove from the role
+
+ @author Peter Marklund
+} {
+ db_dml delete_assignee {}
+
+ workflow::case::role::flush_cache -case_id $case_id
+}
+
ad_proc -public workflow::case::role::assign {
{-case_id:required}
{-array:required}
Index: openacs-4/packages/workflow/tcl/case-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.xql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/workflow/tcl/case-procs.xql 9 Jan 2004 15:47:53 -0000 1.10
+++ openacs-4/packages/workflow/tcl/case-procs.xql 22 Jan 2004 09:53:20 -0000 1.11
@@ -147,6 +147,15 @@
+
+
+ delete from workflow_case_role_party_map
+ where case_id = :case_id
+ and role_id = :role_id
+ and party_id = :party_id
+
+
+
insert into workflow_case_role_party_map
Index: openacs-4/packages/workflow/tcl/role-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/role-procs.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/workflow/tcl/role-procs.tcl 13 Jan 2004 12:36:47 -0000 1.16
+++ openacs-4/packages/workflow/tcl/role-procs.tcl 22 Jan 2004 09:53:20 -0000 1.17
@@ -274,17 +274,26 @@
ad_proc -public workflow::role::get_options {
{-workflow_id:required}
+ {-id_values:boolean}
} {
Get a list of roles in a workflow for use in the 'options' property of a form builder form element.
+ @param id_values Provide this switch if you want the values in the options list to be role id:s instead
+ of short names.
+
+
@author Lars Pind (lars@collaboraid.biz)
} {
set result [list]
# workflow::get_roles returns the roles in sort_order
foreach role_id [workflow::get_roles -workflow_id $workflow_id] {
workflow::role::get -role_id $role_id -array row
- lappend result [list $row(pretty_name) $row(short_name)]
+ if { $id_values_p } {
+ lappend result [list $row(pretty_name) $role_id]
+ } else {
+ lappend result [list $row(pretty_name) $row(short_name)]
+ }
}
return $result
}