[CMF-checkins] SVN: CMF/branches/1.6/C - CMFCore.WorkflowTool:
Using the '(Default)' keyword for a type's
Jens Vagelpohl
jens at dataflake.org
Wed Jun 6 09:36:42 EDT 2007
Log message for revision 76412:
- CMFCore.WorkflowTool: Using the '(Default)' keyword for a type's
workflow chain will now reset any custom workflow chains for the type
(http://www.zope.org/Collectors/CMF/475)
Changed:
U CMF/branches/1.6/CHANGES.txt
U CMF/branches/1.6/CMFCore/WorkflowTool.py
U CMF/branches/1.6/CMFCore/tests/test_WorkflowTool.py
-=-
Modified: CMF/branches/1.6/CHANGES.txt
===================================================================
--- CMF/branches/1.6/CHANGES.txt 2007-06-06 13:28:25 UTC (rev 76411)
+++ CMF/branches/1.6/CHANGES.txt 2007-06-06 13:36:36 UTC (rev 76412)
@@ -2,6 +2,10 @@
Bug Fixes
+ - CMFCore.WorkflowTool: Using the '(Default)' keyword for a type's
+ workflow chain will now reset any custom workflow chains for the type
+ (http://www.zope.org/Collectors/CMF/475)
+
- User folders not supporting the userFolderDelUsers API, such as PAS,
would raise an unhelpful error when members were deleted using the
portal_membership tool.
Modified: CMF/branches/1.6/CMFCore/WorkflowTool.py
===================================================================
--- CMF/branches/1.6/CMFCore/WorkflowTool.py 2007-06-06 13:28:25 UTC (rev 76411)
+++ CMF/branches/1.6/CMFCore/WorkflowTool.py 2007-06-06 13:36:36 UTC (rev 76412)
@@ -464,7 +464,10 @@
self._chains_by_type = cbt = PersistentMapping()
if isinstance(chain, basestring):
- chain = [ wf.strip() for wf in chain.split(',') if wf.strip() ]
+ if chain == '(Default)':
+ chain = ''
+ else:
+ chain = [ wf.strip() for wf in chain.split(',') if wf.strip() ]
ti_ids = [ t.getId() for t in self._listTypeInfo() ]
Modified: CMF/branches/1.6/CMFCore/tests/test_WorkflowTool.py
===================================================================
--- CMF/branches/1.6/CMFCore/tests/test_WorkflowTool.py 2007-06-06 13:28:25 UTC (rev 76411)
+++ CMF/branches/1.6/CMFCore/tests/test_WorkflowTool.py 2007-06-06 13:36:36 UTC (rev 76412)
@@ -288,6 +288,11 @@
tool.setChainForPortalTypes( ('Dummy Content',), '' )
self.assertEquals( tool.getChainFor(dummy), () )
+ # Using the '(Default)' keyword
+ # http://www.zope.org/Collectors/CMF/475
+ tool.setChainForPortalTypes( ('Dummy Content',), '(Default)' )
+ self.assertEquals( tool.getChainFor(dummy), () )
+
def test_getCatalogVariablesFor( self ):
tool = self._makeWithTypesAndChain()
More information about the CMF-checkins
mailing list