cancel
Showing results for 
Search instead for 
Did you mean: 

Version Service and metadata history

angelborroy
Community Manager Community Manager
Community Manager
In order to explain our problem, below some previous steps using Alfresco Share are described.

1. Upload new document
2. Change "description" property to "Description"
3. Upload new version (1.1)
4. Change "description" property to "Another Description"
5. Upload new version (1.2)

We've observed that version 1.1 has "Description" on "description" property on history query instead of "Another Description".

Is this the correct behaviour? Maybe this is an issue?

Thanks in advance.
Hyland Developer Evangelist
5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator
Hello,

this is the correct behaviour if you simply use the "Upload New Version" feature. In this scenario the version changes only if the content of the document changes and only the metadata that is currently attached to the document will be put in the version history. So if you change a property on the current document, it will only show up in the version history after the next "Upload New Version".

The behavior is different, when you manually apply the "Versionable" aspect before doing anything else. In this configuration, every update of a metadata properties triggers a new minor version and as a result each change of metadata will be visible in the version history.

This behavior is controlled by a boolean property on the "Versionable" aspect (cm:autoVersionOnUpdateProps), which is true if you apply the aspect manually and false if it is automatically applied by "Upload New Version".

Regards
Axel

Thanks, Axel.

I've been studying this for a <a href="http://angelborroy.wordpress.com/2013/08/29/alfresco-·-metadata-versioning-analysis/">while</a>.

Using autoVersionOnUpdateProps (e.g. setting the property programmatically) would be an option, but users may be confused about all the intermediate version numbers generated automatically. On the other hand, using default version behavior, will produce incoherent assignments on properties (back to my example: why version 1.0 has "Description" value on "cm:description" property?).

I've raised an <a href="https://issues.alfresco.com/jira/browse/ALF-19860">Issue</a> and it has been accepted and categorized as Critical.

I'll await for a reply before taking one or the other decision.
Hyland Developer Evangelist

Hi,

I realize it's been a while since you asked, but how did you solve this problem ?

We're creating a first version automatically on update. So, properties are tracked properly for our use case.
Hyland Developer Evangelist

derek
Star Contributor
Star Contributor
The issue is not a bug.  You can provide your own implementation for the behaviour, similar to <strong>org.alfresco.repo.version.VersionableAspect</strong>.