[Zope-CMF] CMF 1.3 roadmap / release schedule (preview)

Tres Seaver tseaver@zope.com
Thu, 21 Mar 2002 07:51:57 -0500


Florent Guillaume wrote:
> Tres Seaver  <tseaver@zope.com> wrote:
> 
>>   - Are there outstanding features / fixes which you believe to be
>>     critical for a "stable" 1.3 release?  Note that proposing a feature
>>     without being willing to do (or recruit someone to do) the work to
>>     implement it is a futile exercise;  this is not a request for
>>     "wish-list" items.
> 
> 
> Bug 410 (http://www.zope.org/Products/PTK/Tracker/410) is marked as
> fixed but it isn't.

<snip recipe, now in Tracker #482>

> The problem is that notifyCreated is still called from manage_afterAdd
> (where portal_type hasn't been set), even though an additional one was
> added to constructInstance. But we cannot completely remove the one in
> manage_afterAdd if we want workflows to be reset when doing a copy or a
> paste...

I think that calling 'notifyCreated' from 'manage_afterAdd' is the
Wrong Thing;  'manage_afterAdd' is about adding an object to a container,
not about creation.  In the case of a "Cut" followed by a "Paste", the
object is not logically "new" at all;  calling 'notifyCreated' in
'manage_afterAdd' is the source of Jeff Sasmor's tracker issue #342:

   http://www.zope.org/Products/PTK/Tracker/342

It looks like OFS.CopySupport would actually do the RightThing if we
called 'notifyCreated' only in 'manage_afterClone';  CopySupport only
calls this hook if the paste is a "copy" operation, rathern than a
"move" operation.

Florent, Jeff:  can you please try this patch to CMFCore.CatalogAware
and see if it resolves your issues:

################ begin patch #####################
--- CMFCore/CMFCatalogAware.py	25 Feb 2002 16:08:01 -0000	1.2
+++ CMFCore/CMFCatalogAware.py	21 Mar 2002 12:48:34 -0000
@@ -54,10 +54,16 @@
          #   Are we being added (or moved)?
          #
          if aq_base(container) is not aq_base(self):
+            self.indexObject()
+
+    def manage_afterClone(self, item):
+        """
+            Add self to workflow, as we have just been cloned.
+        """
+        if aq_base(item) is aq_base(self):
              wf = getToolByName(self, 'portal_workflow', None)
              if wf is not None:
                  wf.notifyCreated(self)
-            self.indexObject()

      def manage_beforeDelete(self, item, container):
          """
################# end patch ########################

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com