[Zope-CMF] Copy/Paste Workflow Bug?

Florent Guillaume fg@nuxeo.com
Fri, 19 Jul 2002 14:20:05 +0000 (UTC)


Sidnei da Silva  <sidnei@x3ng.com.br> wrote:
> Howdy,
> 
> I was migration an old site this weekend, and after copying all the object 
> from the old to the new site, i noticed that most of them lost the workflow 
> state.
> 
> I tried to reproduce the bug, and this is what happens:
> 
>   * Cut object, paste on another folder -> workflow state is kept.
>   * Copy object, paste on same folder -> workflow state is lost for new 
> object.
>   * Copy object, paste on another folder -> workflow state is lost for new 
> object.
> 
> Alan told me that this should have been fixed a while ago, and i remeber the 
> thread, but i cant remember the solution. He also mentioned that maybe 
> something was appending to review_workflow or workflow_history, and removing 
> the last item there would fix it, but i couldnt find the relation to 
> copy/paste.

That is a deliberate design decision, as Tres said. Copied objects are
new so should get back at the start of their workflow.

If you want to change that, simply remove the call to self.notifyCreated
in manage_afterClone (in CMFCatalogAware). Do that in a subclass of
course.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com