-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 8.10-HF03
-
Component/s: Automation
-
Release Notes Summary:It is possible not to save the document when calling Document.CopySchema operation
-
Impact type:Configuration Change
-
Upgrade notes:
-
Sprint:nxNest Sprint 9.3.5
-
Story Points:1
The Document.CopySchema operation always save the document (call to session.saveDocument(...))
There is a save parameter, but it is used to optionally save the session, not the document.
This is a big problem: It makes it impossible to call the operation for "about to create" or "before modification" events. This is a problem when you denormalize data, to "inherit" from a parent folder (typically: Drop an image in a "MarketingCampaign folderish, and duplicate the marketing and project and whatever schemas from the MarketingCampaign document)
The operation should be modified. And to ensure compatibility: maybe just Add a saveDocument optional parameter, default value true
Notice this operation was taken from nuxeo-labs, but for some reason I 'm not aware of, it was somehow decided to store always the document.
The workaround is very cumbersome and implies using RunScript to perform the duplication of the schema...