[Erp5-report] r18387 - in /experimental/bt5/erp5_core_experimental: SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Dec 18 12:59:04 CET 2007
Author: luke
Date: Tue Dec 18 12:59:03 2007
New Revision: 18387
URL: http://svn.erp5.org?rev=18387&view=rev
Log:
- choose only not interaction workflows
- return None if more than one workflow provide transition_id
Modified:
experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/Base_getLastTransitionInfo.xml
experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/uniq.xml
experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/view_url.xml
experimental/bt5/erp5_core_experimental/bt/revision
Modified: experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/Base_getLastTransitionInfo.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/Base_getLastTransitionInfo.xml?rev=18387&r1=18386&r2=18387&view=diff
==============================================================================
--- experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/Base_getLastTransitionInfo.xml (original)
+++ experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/Base_getLastTransitionInfo.xml Tue Dec 18 12:59:03 2007
@@ -82,15 +82,25 @@
if workflow_id is not None:\n
workflow_id_list = [workflow_id,]\n
else:\n
- workflow_id_list = [q.id for q in context.portal_workflow.getWorkflowsFor(ob=context)]\n
+ # XXX: How to choose only NOT interaction workflows?\n
+ workflow_id_list = [q.id for q in context.portal_workflow.getWorkflowsFor(ob=context) \\\n
+ if getattr(q,\'interactions\',None) is None]\n
\n
+info_list = []\n
for workflow_id in workflow_id_list:\n
workflow_item_list = context.Base_getWorkflowHistoryItemList(workflow_id, display=0)\n
workflow_item_list.reverse()\n
for workflow_item in workflow_item_list:\n
if workflow_item.getProperty(\'action\') == transition_id:\n
- return workflow_item\n
-return None\n
+ info_list.append(workflow_item)\n
+ break\n
+\n
+if len(info_list) != 1:\n
+ # What to do, if more than one workflow define transition_id?\n
+ # Raise exception? Return None? [now] Return any? [former] Return first, sorted by workflow_id?\n
+ script.log(\'There was more than one workflow, which provided transition %s for object %s\'%(transition_id,context))\n
+ return None\n
+return info_list[0]\n
]]></string> </value>
@@ -145,8 +155,13 @@
<string>_getattr_</string>
<string>context</string>
<string>q</string>
+ <string>getattr</string>
+ <string>info_list</string>
<string>workflow_item_list</string>
<string>workflow_item</string>
+ <string>len</string>
+ <string>script</string>
+ <string>_getitem_</string>
</tuple>
</value>
</item>
Modified: experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/uniq.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/uniq.xml?rev=18387&r1=18386&r2=18387&view=diff
==============================================================================
--- experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/uniq.xml (original)
+++ experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/uniq.xml Tue Dec 18 12:59:03 2007
@@ -132,7 +132,7 @@
<string>zip</string>
<string>None</string>
<string>getattr</string>
-<string>context</string>
+ <string>context</string>
<string>compare_method</string>
</tuple>
</value>
Modified: experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/view_url.xml
URL: http://svn.erp5.org/experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/view_url.xml?rev=18387&r1=18386&r2=18387&view=diff
==============================================================================
--- experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/view_url.xml (original)
+++ experimental/bt5/erp5_core_experimental/SkinTemplateItem/portal_skins/erp5_core_experimental/view_url.xml Tue Dec 18 12:59:03 2007
@@ -118,7 +118,7 @@
<value>
<tuple>
<string>_getattr_</string>
-<string>context</string>
+ <string>context</string>
</tuple>
</value>
</item>
Modified: experimental/bt5/erp5_core_experimental/bt/revision
URL: http://svn.erp5.org/experimental/bt5/erp5_core_experimental/bt/revision?rev=18387&r1=18386&r2=18387&view=diff
==============================================================================
--- experimental/bt5/erp5_core_experimental/bt/revision (original)
+++ experimental/bt5/erp5_core_experimental/bt/revision Tue Dec 18 12:59:03 2007
@@ -1,1 +1,1 @@
-3
+5
More information about the Erp5-report
mailing list