ACS - Previous version of a node is not displayed within Share UI if the node content created without versioning is replaced

Description

As part of the ACS Hotfix version 6.2.2.7 an option was added in order to create documents through REST API without the "cm:versionable" aspect applied by default, this works with the parameter "versioningEnabled" set to "false".
The problem is that once the content of a document created without versioning is updated using the "PUT /content" REST API (https://api-explorer.alfresco.com/api-explorer/#!/nodes/updateNodeContent) and the "cm:versionable" aspect is applied (creating a new version of the initial document), the initial version of the document is not visible within the "Version History" tab in Share and cannot be restored.

Supporting evidence

Steps to reproduce

  • Create a document using the "POST /children" REST API, with the "versioningEnabled" parameter set to "false"

  • The document has been created without issues

  • At this point perform a request to the "PUT /content" REST API (https://api-explorer.alfresco.com/api-explorer/#!/nodes/updateNodeContent), with the same NODE_ID, a new binary file ,"majorVersion" set to "true" and a comment

Expected Behaviour

The content of the existing document is replaced by the new doc, and i'm able to display and restore the previous version from the "Version History" tab within Share UI (see attachment "previousVersionDisplayed.png")

Observed Behaviour

The content of the existing document is replaced by the new doc, but i'm unable to display and restore the previous version of the document from the "Version History" tab within Share UI (see attachment "previousVersionMissing.png")

Additional notes
For simplicity i created a Postman collection with the two requests to replicate the problem (see attachment "DocumentVersioning.postman_collection.json").
To reproduce you'll need to run the "create_node" request first and then the "update_node_content" request.

Environment

None

Testcase ID

None

Activity

Show:
Scott Ashcraft
March 11, 2021, 2:06 PM

, this is expected behavior. Because the node doesn't have the versionable aspect, a new version is not going to be created. If the customer expects the previous version to be retained when performing an Update Content, the versionable aspect will need to be added to the node prior to updating the content.

Not a bug

Assignee

Scott Ashcraft

Reporter

Damiano Mondardo

ACT Numbers

00346100

Bug Priority

Category 3