Version history does not include property updates

Let us say we upload/index a document (v1.0). Let us say we update its custom properties afterwards.

Then, we upload a new version (v1.1) of the document.

Now when I see the history, the old version (v1.0) does not have the updated custom properties.

Before making a new version (v1.1), does it not make sense for v1.0 to have all that was before v1.1

In a way, I lost all the update values in between 1.0 and 1.1

For example, we store the user ids of users, who have viewed the content of the document, into a array/list property called "viewers". This array/list property is a custom property on the document.

Let us say, the users u1 and u2, have viewed respectively the document so far after it has been created.

Now before creating a new version of the same document, if I see the values of the properties, I can see the value for the viewers property as "u2, u1".

Now once I upload a new version of the document, the new (and the latest) version (v1.1) does not have any viewers and it is correct. However, if I view the version history, and look into version (v1.0), I see the viewers property empty. And now the latest version (v1.1) also do not have any viewers, which is actually correct. However, there are users who viewed the earlier version v1.0. You see, I lost the viewers on the initial version.

How do I go about maintaining the viewers for version v1.0?

We do not have our custom model defined with mandatory aspect:versionable. I do not know if we have to do this. Even without this, when we checkout and checkin, I see the versions getting created.

I read this online:

Any properties that you set on a file are saved with the current version of a file, and written to the Version History after a major update; for example, when a new file is uploaded. This means that if you save properties in version 1.0, they are saved in the Version History of version 1.1.

The property version.store.enableAutoVersionOnUpdateProps is set to false by default. This means that the version history is not incremented when using Edit Properties in Share. Set this property to version.store.enableAutoVersionOnUpdateProps=true in alfresco-global.properties to enable this property.

The version 1.0 is created when the document is initially created and only with the properties set at this time. If you update the properties / metadata only, the behaviour is dependent on a metadata property called "cm:autoVersionOnUpdateProps" which can be set on any node. Depending on how you create the document (via which API), there may be different default values. Provided that the specific API you are using to create the document does not set a value, the default will be determined by version.store.enableAutoVersionOnUpdateProps, or it will be set to true (if that config variable has not been set).

If that property is set to true, any property updates on a node will trigger creation of a new version.

The same concept also applies to automatic version creation on content change. There is "cm:autoVersion", which can have its default defined via version.store.enableAutoVersioning, unless a specific API already sets a default value on its own.

The behaviour you observe as the intended default, which avoids creating excessive "waste" versions unless specifically configured to version on every minute property change...

Via CMIS you have the explicit option to specify how an update should be treated as to the versioning state.

The version 1.0 is created when the document is initially created and only with the properties set at this time. If you update the properties / metadata only, the behaviour is dependent on a metadata property called "cm:autoVersionOnUpdateProps" which can be set on any node. Depending on how you create the document (via which API), there may be different default values. Provided that the specific API you are using to create the document does not set a value, the default will be determined by version.store.enableAutoVersionOnUpdateProps, or it will be set to true (if that config variable has not been set).

If that property is set to true, any property updates on a node will trigger creation of a new version.

The same concept also applies to automatic version creation on content change. There is "cm:autoVersion", which can have its default defined via version.store.enableAutoVersioning, unless a specific API already sets a default value on its own.

The behaviour you observe as the intended default, which avoids creating excessive "waste" versions unless specifically configured to version on every minute property change...

Via CMIS you have the explicit option to specify how an update should be treated as to the versioning state.