[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/ - WorkflowTool: Passing the "magic" chain name "(Default)" to the

Jens Vagelpohl jens at dataflake.org
Sat Sep 13 14:01:53 EDT 2008


Log message for revision 91120:
  - WorkflowTool: Passing the "magic" chain name "(Default)" to the
    setChainForPortalTypes method did not set the chain to the default
    chain value as expected.
    (https://bugs.launchpad.net/zope-cmf/+bug/161702)
  

Changed:
  U   Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
  U   Products.CMFCore/trunk/Products/CMFCore/WorkflowTool.py
  U   Products.CMFCore/trunk/Products/CMFCore/tests/test_WorkflowTool.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt	2008-09-13 16:50:11 UTC (rev 91119)
+++ Products.CMFCore/trunk/Products/CMFCore/CHANGES.txt	2008-09-13 18:01:52 UTC (rev 91120)
@@ -4,6 +4,11 @@
 2.2.0 (unreleased)
 ------------------
 
+- WorkflowTool: Passing the "magic" chain name "(Default)" to the
+  setChainForPortalTypes method did not set the chain to the default 
+  chain value as expected.
+  (https://bugs.launchpad.net/zope-cmf/+bug/161702)
+
 - ZMI: Prevent users from creating content through the ZMI by hiding the
   entry for "CMFCore Content".
 

Modified: Products.CMFCore/trunk/Products/CMFCore/WorkflowTool.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/WorkflowTool.py	2008-09-13 16:50:11 UTC (rev 91119)
+++ Products.CMFCore/trunk/Products/CMFCore/WorkflowTool.py	2008-09-13 18:01:52 UTC (rev 91120)
@@ -390,7 +390,7 @@
 
         if isinstance(chain, basestring):
             if chain == '(Default)':
-                chain = ''
+                chain = self.getDefaultChain()
             else:
                 chain = [ wf.strip() for wf in chain.split(',') if wf.strip() ]
 

Modified: Products.CMFCore/trunk/Products/CMFCore/tests/test_WorkflowTool.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/tests/test_WorkflowTool.py	2008-09-13 16:50:11 UTC (rev 91119)
+++ Products.CMFCore/trunk/Products/CMFCore/tests/test_WorkflowTool.py	2008-09-13 18:01:52 UTC (rev 91120)
@@ -298,9 +298,9 @@
         self.assertEquals( tool.getChainFor(dummy), ('b', 'a') )
 
         # Using the '(Default)' keyword
-        # http://www.zope.org/Collectors/CMF/475
+        # https://bugs.launchpad.net/zope-cmf/+bug/161702
         tool.setChainForPortalTypes( ('Dummy Content',), '(Default)' )
-        self.assertEquals( tool.getChainFor(dummy), () )
+        self.assertEquals( tool.getDefaultChain(), tool.getChainFor( dummy ) )
 
     def test_getCatalogVariablesFor( self ):
 



More information about the Checkins mailing list