[Testbot] Plone 4.3 - Python 2.7 - Build # 2425 - Still failing! - 11 failure(s)

jenkins at plone.org jenkins at plone.org
Wed Aug 6 14:04:10 UTC 2014


-------------------------------------------------------------------------------
Plone 4.3 - Python 2.7 - Build # 2425 - Still Failing!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-4.3-python-2.7/2425/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.contentrules
Branch: refs/heads/master
Date: 2014-07-29T12:00:30+03:00
Author: Alexandru Ghica (alecghica) <alec.ghica at eaudeweb.ro>
Commit: https://github.com/plone/plone.app.contentrules/commit/17edd3e52e0aabf5891be2dd13684eb4d554664d

Registered the copy event

- Registered the copy event so rules can now be triggered for it.
  [alecghica]

Files changed:
M CHANGES.rst
M plone/app/contentrules/configure.zcml
M plone/app/contentrules/handlers.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 21566d4..6746697 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,8 @@ Changelog
 
 - Ported tests to plone.app.testing
   [tomgross]
+- Registered the copy event so rules can now be triggered for it.
+  [alecghica]
 
 
 3.0.7 (2014-04-13)
diff --git a/plone/app/contentrules/configure.zcml b/plone/app/contentrules/configure.zcml
index ba98092..1262ffc 100644
--- a/plone/app/contentrules/configure.zcml
+++ b/plone/app/contentrules/configure.zcml
@@ -36,7 +36,7 @@
       <class class="Products.ATContentTypes.content.folder.ATBTreeFolder">
           <implements interface="plone.contentrules.engine.interfaces.IRuleAssignable" />
       </class>
-    
+
     </configure>
 
     <!-- Let rules be annotatable - used to keep track of rule-to-assignment mappings -->
@@ -66,11 +66,17 @@
       />
 
     <interface
+      interface="zope.lifecycleevent.interfaces.IObjectCopiedEvent"
+      type="plone.contentrules.rule.interfaces.IRuleEventType"
+      name="Object copied"
+      />
+
+    <interface
       interface="Products.CMFCore.interfaces.IActionSucceededEvent"
       type="plone.contentrules.rule.interfaces.IRuleEventType"
       name="Workflow state changed"
       />
-    
+
     <interface
       interface="Products.PluggableAuthService.interfaces.events.IUserLoggedInEvent"
       type="plone.contentrules.rule.interfaces.IRuleEventType"
@@ -94,7 +100,7 @@
       type="plone.contentrules.rule.interfaces.IRuleEventType"
       name="User Removed"
       />
-          
+
    <!-- Register handlers -->
 
     <!-- Rule triggers -->
@@ -115,6 +121,10 @@
       for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
       handler=".handlers.modified"
       />
+     <subscriber
+      for="zope.lifecycleevent.interfaces.IObjectCopiedEvent"
+      handler=".handlers.copied"
+      />
     <subscriber
       for="Products.CMFCore.interfaces.IActionSucceededEvent"
       handler=".handlers.workflow_action"
@@ -153,7 +163,7 @@
              zope.lifecycleevent.interfaces.IObjectRemovedEvent"
         handler=".rule.rule_removed"
         />
-        
+
     <!-- Register a name chooser explicitly -->
 
     <adapter
diff --git a/plone/app/contentrules/handlers.py b/plone/app/contentrules/handlers.py
index 4cece16..c6b6d21 100644
--- a/plone/app/contentrules/handlers.py
+++ b/plone/app/contentrules/handlers.py
@@ -3,6 +3,7 @@
 from zope.component import queryUtility
 from zope.container.interfaces import IObjectAddedEvent, IObjectRemovedEvent, \
     IContainerModifiedEvent
+from zope.lifecycleevent.interfaces import IObjectCopiedEvent
 from zope.interface import Interface
 from zope.component.hooks import getSite
 
@@ -226,13 +227,26 @@ def modified(event):
 
     # Let the special handler take care of IObjectInitializedEvent
     for event_if in (IObjectInitializedEvent, IObjectAddedEvent,
-        IObjectRemovedEvent, IContainerModifiedEvent):
+        IObjectRemovedEvent, IContainerModifiedEvent, IObjectCopiedEvent):
         if event_if.providedBy(event):
             return
 
     execute_rules(event)
 
 
+def copied(event):
+    """When an object is copied, execute rules assigned to its parent
+    """
+    obj = event.object
+    if not (IContentish.providedBy(obj) or IComment.providedBy(obj)):
+        return
+
+    if is_portal_factory(obj):
+        return
+
+    execute(aq_parent(aq_inner(event.original)), event)
+
+
 def workflow_action(event):
     """When a workflow action is invoked on an object, execute rules assigned
     to its parent.


Repository: plone.app.contentrules
Branch: refs/heads/master
Date: 2014-08-06T16:09:24+03:00
Author: Alexandru Ghica (alecghica) <alec.ghica at eaudeweb.ro>
Commit: https://github.com/plone/plone.app.contentrules/commit/0959bf800d3312353ba6dadbaa6be0d0ea7c7d49

Merge pull request #7 from alecghica/master

Registered the copy event.

Files changed:
M CHANGES.rst
M plone/app/contentrules/configure.zcml
M plone/app/contentrules/handlers.py

diff --git a/CHANGES.rst b/CHANGES.rst
index 21566d4..6746697 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -6,6 +6,8 @@ Changelog
 
 - Ported tests to plone.app.testing
   [tomgross]
+- Registered the copy event so rules can now be triggered for it.
+  [alecghica]
 
 
 3.0.7 (2014-04-13)
diff --git a/plone/app/contentrules/configure.zcml b/plone/app/contentrules/configure.zcml
index ba98092..1262ffc 100644
--- a/plone/app/contentrules/configure.zcml
+++ b/plone/app/contentrules/configure.zcml
@@ -36,7 +36,7 @@
       <class class="Products.ATContentTypes.content.folder.ATBTreeFolder">
           <implements interface="plone.contentrules.engine.interfaces.IRuleAssignable" />
       </class>
-    
+
     </configure>
 
     <!-- Let rules be annotatable - used to keep track of rule-to-assignment mappings -->
@@ -66,11 +66,17 @@
       />
 
     <interface
+      interface="zope.lifecycleevent.interfaces.IObjectCopiedEvent"
+      type="plone.contentrules.rule.interfaces.IRuleEventType"
+      name="Object copied"
+      />
+
+    <interface
       interface="Products.CMFCore.interfaces.IActionSucceededEvent"
       type="plone.contentrules.rule.interfaces.IRuleEventType"
       name="Workflow state changed"
       />
-    
+
     <interface
       interface="Products.PluggableAuthService.interfaces.events.IUserLoggedInEvent"
       type="plone.contentrules.rule.interfaces.IRuleEventType"
@@ -94,7 +100,7 @@
       type="plone.contentrules.rule.interfaces.IRuleEventType"
       name="User Removed"
       />
-          
+
    <!-- Register handlers -->
 
     <!-- Rule triggers -->
@@ -115,6 +121,10 @@
       for="zope.lifecycleevent.interfaces.IObjectModifiedEvent"
       handler=".handlers.modified"
       />
+     <subscriber
+      for="zope.lifecycleevent.interfaces.IObjectCopiedEvent"
+      handler=".handlers.copied"
+      />
     <subscriber
       for="Products.CMFCore.interfaces.IActionSucceededEvent"
       handler=".handlers.workflow_action"
@@ -153,7 +163,7 @@
              zope.lifecycleevent.interfaces.IObjectRemovedEvent"
         handler=".rule.rule_removed"
         />
-        
+
     <!-- Register a name chooser explicitly -->
 
     <adapter
diff --git a/plone/app/contentrules/handlers.py b/plone/app/contentrules/handlers.py
index 4cece16..c6b6d21 100644
--- a/plone/app/contentrules/handlers.py
+++ b/plone/app/contentrules/handlers.py
@@ -3,6 +3,7 @@
 from zope.component import queryUtility
 from zope.container.interfaces import IObjectAddedEvent, IObjectRemovedEvent, \
     IContainerModifiedEvent
+from zope.lifecycleevent.interfaces import IObjectCopiedEvent
 from zope.interface import Interface
 from zope.component.hooks import getSite
 
@@ -226,13 +227,26 @@ def modified(event):
 
     # Let the special handler take care of IObjectInitializedEvent
     for event_if in (IObjectInitializedEvent, IObjectAddedEvent,
-        IObjectRemovedEvent, IContainerModifiedEvent):
+        IObjectRemovedEvent, IContainerModifiedEvent, IObjectCopiedEvent):
         if event_if.providedBy(event):
             return
 
     execute_rules(event)
 
 
+def copied(event):
+    """When an object is copied, execute rules assigned to its parent
+    """
+    obj = event.object
+    if not (IContentish.providedBy(obj) or IComment.providedBy(obj)):
+        return
+
+    if is_portal_factory(obj):
+        return
+
+    execute(aq_parent(aq_inner(event.original)), event)
+
+
 def workflow_action(event):
     """When a workflow action is invoked on an object, execute rules assigned
     to its parent.




-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 8041 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140806/020d4ad6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 103681 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140806/020d4ad6/attachment-0003.obj>


More information about the Testbot mailing list