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

Fix versioning of Video document when incrementing version at creation time using a custom policy

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10, 2021.0
    • Fix Version/s: 10.10-HF58, 2021.15
    • Component/s: Core
    • Release Notes Summary:
      Video conversions don't checkout the checked in documents
    • Backlog priority:
      700
    • Sprint:
      nxplatform #52

      Description

      When a custom versioning policy is defined to increment the version when a Video document is created, the working copy gets checked out by a background process (maybe the video conversions), the version of the document becoming 1.0+.

      How to reproduce:

      • fire up a 10.10 instance with addon nuxeo-dam installed (and ffmpeg command installed) and the following XML contribution deployed:
        <component name="custom-versioning-policies" >
        
            <extension target="org.nuxeo.ecm.core.api.versioning.VersioningService" point="filters">
                <filter id="isDocumentBeingCreatedForTheFirstTime">
                    <condition>#{previousDocument==null}</condition>
                </filter>
                <filter id="isCurrentDocumentAVideo">
                    <condition>#{currentDocument.type == "Video"}</condition>
                </filter>
                <filter id="isCurrentDocumentAPicture">
                    <condition>#{currentDocument.type == "Picture"}</condition>
                </filter>
            </extension>
            <extension target="org.nuxeo.ecm.core.api.versioning.VersioningService" point="policies">
                <policy id="custom-policy-for-videos" order="35" increment="MAJOR">
                    <filter-id>isDocumentBeingCreatedForTheFirstTime</filter-id>
                    <filter-id>isCurrentDocumentAVideo</filter-id>
                </policy>
                <policy id="custom-policy-for-pictures" order="40" increment="MAJOR">
                    <filter-id>isDocumentBeingCreatedForTheFirstTime</filter-id>
                    <filter-id>isCurrentDocumentAPicture</filter-id>
                </policy>
            </extension>
        
        </component>
        
      • log in the Web UI
      • create a Video document with a video file
      • the Web UI redirects to the created document, the version is 1.0
      • after the video conversions are generated, refresh the page

      Expected result: the version is still 1.0
      Actual result: the version is 1.0+

      Applying the same scenario but with a Picture document does not produce the same faulty result.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: