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

CoreSession.saveDocumentAsNewVersion don't work on documents that were not yet versioned

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.1 M1
    • Component/s: Core

      Description

      CoreSession.saveDocumentAsNewVersion don't work on documents that were not yet versioned
      When calling this method on a document not yet versioned an exception is thrown by
      --> generateVersionLabelFor()
      ---> getVersionsForDocument()
      ---> doc.getVersions()

      because it tries to access the versionHistory node for this document and the node doesn't exists

      If you manually make a checkout on the doc (create a new version) the the method will work correctly

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified