[Erp5-report] r44661 kazuhiko - in /erp5/trunk/bt5/erp5_dms: WorkflowTemplateItem/portal_wo...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 28 13:56:35 CEST 2011


Author: kazuhiko
Date: Mon Mar 28 13:56:34 2011
New Revision: 44661

URL: http://svn.erp5.org?rev=44661&view=rev
Log:
2011-03-28 Kazuhiko
* we should have at most only one published/released/shared document for each reference/language, i.e. we should not have both published and released document with the same reference/language at the same time.

Removed:
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveSharedVersion.xml
Modified:
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish_alive.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release_alive.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share.xml
    erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share_alive.xml
    erp5/trunk/bt5/erp5_dms/bt/change_log
    erp5/trunk/bt5/erp5_dms/bt/revision

Removed: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml?rev=44660&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archivePublicVersion.xml (removed)
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>context.archiveVersion(state_change, validation_state=[\'published\', \'published_alive\'])\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>state_change</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>archivePublicVersion</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml?rev=44660&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveReleasedVersion.xml (removed)
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>context.archiveVersion(state_change, validation_state=[\'released\', \'released_alive\'])\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>state_change</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>archiveReleasedVersion</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Removed: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveSharedVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveSharedVersion.xml?rev=44660&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveSharedVersion.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveSharedVersion.xml (removed)
@@ -1,67 +0,0 @@
-<?xml version="1.0"?>
-<ZopeData>
-  <record id="1" aka="AAAAAAAAAAE=">
-    <pickle>
-      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-    </pickle>
-    <pickle>
-      <dictionary>
-        <item>
-            <key> <string>Script_magic</string> </key>
-            <value> <int>3</int> </value>
-        </item>
-        <item>
-            <key> <string>_bind_names</string> </key>
-            <value>
-              <object>
-                <klass>
-                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
-                </klass>
-                <tuple/>
-                <state>
-                  <dictionary>
-                    <item>
-                        <key> <string>_asgns</string> </key>
-                        <value>
-                          <dictionary>
-                            <item>
-                                <key> <string>name_container</string> </key>
-                                <value> <string>container</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_context</string> </key>
-                                <value> <string>context</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_m_self</string> </key>
-                                <value> <string>script</string> </value>
-                            </item>
-                            <item>
-                                <key> <string>name_subpath</string> </key>
-                                <value> <string>traverse_subpath</string> </value>
-                            </item>
-                          </dictionary>
-                        </value>
-                    </item>
-                  </dictionary>
-                </state>
-              </object>
-            </value>
-        </item>
-        <item>
-            <key> <string>_body</string> </key>
-            <value> <string>context.archiveVersion(state_change, validation_state=[\'shared\', \'shared_alive\'])\n
-</string> </value>
-        </item>
-        <item>
-            <key> <string>_params</string> </key>
-            <value> <string>state_change</string> </value>
-        </item>
-        <item>
-            <key> <string>id</string> </key>
-            <value> <string>archiveSharedVersion</string> </value>
-        </item>
-      </dictionary>
-    </pickle>
-  </record>
-</ZopeData>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/scripts/archiveVersion.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -57,32 +57,35 @@ The previous version is archived automat
 This will only apply to documents with enough coordinates\n
 (ex. reference, language, version).\n
 """\n
-o = state_change[\'object\']\n
-reference = o.getReference()\n
+document = state_change[\'object\']\n
+reference = document.getReference()\n
 if not reference:\n
   # If this object has no reference, we can not do anything\n
   return\n
 \n
-language = o.getLanguage()\n
+portal = document.getPortalObject()\n
+portal_catalog = portal.portal_catalog\n
+language = document.getLanguage()\n
 if not language:\n
   # If language is None, we have to check is this document\n
   # is language independent. In this case, archival is possible\n
   # But if a document exists with same reference and defined\n
   # language, we can not do anything\n
-  for o in context.portal_catalog(reference=reference, validation_state=validation_state):\n
-    document = o.getObject()\n
-    if not document.getLanguage():\n
-      document.archive()\n
+  for old_document in portal_catalog(reference=reference, validation_state=validation_state):\n
+    old_document = old_document.getObject()\n
+    if not old_document.getLanguage():\n
+      old_document.archive()\n
   return\n
 \n
 # We can now archive all documents with same reference and language in published state\n
-for o in context.portal_catalog(reference=reference, language=language, validation_state=validation_state):\n
-  o.getObject().archive()\n
+for old_document in portal_catalog(reference=reference, language=language, validation_state=validation_state):\n
+  old_document = old_document.getObject()\n
+  old_document.archive()\n
 </string> </value>
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>state_change, validation_state=[\'published\', \'published_alive\']</string> </value>
+            <value> <string>state_change, validation_state=[\'published\', \'published_alive\', \'released\', \'released_alive\', \'shared\', \'shared_alive\']</string> </value>
         </item>
         <item>
             <key> <string>id</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archivePublicVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish_alive.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish_alive.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish_alive.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/publish_alive.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archivePublicVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archiveReleasedVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release_alive.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release_alive.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release_alive.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/release_alive.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archiveReleasedVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archiveSharedVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share_alive.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share_alive.xml?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share_alive.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/WorkflowTemplateItem/portal_workflow/document_publication_workflow/transitions/share_alive.xml [utf8] Mon Mar 28 13:56:34 2011
@@ -11,6 +11,10 @@
             <value> <string>workflow</string> </value>
         </item>
         <item>
+            <key> <string>actbox_icon</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
             <key> <string>actbox_name</string> </key>
             <value> <string></string> </value>
         </item>
@@ -20,7 +24,7 @@
         </item>
         <item>
             <key> <string>after_script_name</string> </key>
-            <value> <string>archiveSharedVersion</string> </value>
+            <value> <string>archiveVersion</string> </value>
         </item>
         <item>
             <key> <string>description</string> </key>

Modified: erp5/trunk/bt5/erp5_dms/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/change_log?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/change_log [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/bt/change_log [utf8] Mon Mar 28 13:56:34 2011
@@ -1,3 +1,6 @@
+2011-03-28 Kazuhiko
+* we should have at most only one published/released/shared document for each reference/language, i.e. we should not have both published and released document with the same reference/language at the same time.
+
 2010-07-08 mohamadou
 * revert the last commit, setting permission on this state breaks some sites security.
 

Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=44661&r1=44660&r2=44661&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision [utf8] Mon Mar 28 13:56:34 2011
@@ -1 +1 @@
-1246
\ No newline at end of file
+1247
\ No newline at end of file



More information about the Erp5-report mailing list