Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-22082

Document.CopySchema should not save the document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 8.10-HF03
    • Fix Version/s: 8.10-HF14, 9.3
    • 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:
      Hide

      Added a new parameter, saveDocument, true by default to ensure backward compatibility. When set to false the document is not saved, and the session is not saved.

      Show
      Added a new parameter, saveDocument , true by default to ensure backward compatibility. When set to false the document is not saved, and the session is not saved.
    • Sprint:
      nxNest Sprint 9.3.5
    • Story Points:
      1

      Description

      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...

        Attachments

          Activity

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m