From c00c36364ea6e122494b4971d95eccec996c1549 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 27 May 2008 15:40:32 +0000
Subject: [PATCH] Assignment Workflow: * give Modify portal content to Manager
 role in closed state * call Assignment_setStopDate in after script of close
 transition, and add a Manager proxy role to this script.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21172 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../assignment_workflow/states/closed.xml     | 20 ++++++++-----------
 .../assignment_workflow/transitions/close.xml | 11 ++++------
 .../transitions/close_action.xml              |  2 +-
 .../assignment_workflow/worklists.xml         |  7 ++-----
 bt5/erp5_base/bt/revision                     |  2 +-
 5 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/closed.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/closed.xml
index dccae1c33d..097a27bc26 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/closed.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/states/closed.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.States</string>
-          <string>StateDefinition</string>
-        </tuple>
-        <none/>
+        <global name="StateDefinition" module="Products.DCWorkflow.States"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -51,17 +48,14 @@
   <record id="2" aka="AAAAAAAAAAI=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Persistence</string>
-          <string>PersistentMapping</string>
-        </tuple>
-        <none/>
+        <global name="PersistentMapping" module="Persistence.mapping"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
       <dictionary>
         <item>
-            <key> <string>_container</string> </key>
+            <key> <string>data</string> </key>
             <value>
               <dictionary>
                 <item>
@@ -78,7 +72,9 @@
                 <item>
                     <key> <string>Modify portal content</string> </key>
                     <value>
-                      <tuple/>
+                      <tuple>
+                        <string>Manager</string>
+                      </tuple>
                     </value>
                 </item>
                 <item>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close.xml
index 5702e3ed8c..b8930a38b4 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Transitions</string>
-          <string>TransitionDefinition</string>
-        </tuple>
-        <none/>
+        <global name="TransitionDefinition" module="Products.DCWorkflow.Transitions"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -32,7 +29,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>Assignment_updateUserSecurityGroup</string> </value>
+            <value> <string>Assignment_setStopDate</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>
@@ -54,7 +51,7 @@
         </item>
         <item>
             <key> <string>script_name</string> </key>
-            <value> <string></string> </value>
+            <value> <string>Assignment_updateUserSecurityGroup</string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close_action.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close_action.xml
index 52c3b40db0..29d400cd98 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close_action.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/transitions/close_action.xml
@@ -51,7 +51,7 @@
         </item>
         <item>
             <key> <string>script_name</string> </key>
-            <value> <string>Assignment_setStopDate</string> </value>
+            <value> <string></string> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/worklists.xml b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/worklists.xml
index 746450c318..609a885c76 100644
--- a/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/worklists.xml
+++ b/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/worklists.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.DCWorkflow.Worklists</string>
-          <string>Worklists</string>
-        </tuple>
-        <none/>
+        <global name="Worklists" module="Products.DCWorkflow.Worklists"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
diff --git a/bt5/erp5_base/bt/revision b/bt5/erp5_base/bt/revision
index 5160788e93..e0da8ae09a 100644
--- a/bt5/erp5_base/bt/revision
+++ b/bt5/erp5_base/bt/revision
@@ -1 +1 @@
-307
\ No newline at end of file
+309
\ No newline at end of file
-- 
2.30.9