Hello,
I've installed alfresco community 5.2 in my company. the system is working perfectly.
Nevertheless, due to a large amount of document needed to be uploaded on alfresco, we have to use the versioning system.
However, we don't need to begin the version at 1.0.
For example, we need to upload a document which begins at version 26.0.
After a large amount of time passed seeking the web, I could not find the answer to my question.
Alfresco start the versioning at 1.0,
How to set a different variable than 1.0 ?
Thanks for all for your answer,
Best regards,
Thomas
You can achieve this using behaviours. Implement below CalculateVersionLabelPolicy.
VersionServicePolicies.CalculateVersionLabelPolicy
Below is some sample code for the same.
public class somcoVersionServicePolicies implements
VersionServicePolicies.CalculateVersionLabelPolicy {
@Override
public String calculateVersionLabel(QName classRef,
Version preceedingVersion, int versionNumber,
Map<String, Serializable> verisonProperties) {
StringversionNumber = "1.0";
//Logic to calculate veersion
return versionNumber;
}
}
Some more ideas on how to customize the versioning behaviour.
Technical Tips & Tricks: How to Change the Alfresco Version Label Format
Thanks a lot for your answer, however i'm a little rookie in alfresco using, how could I edit the code that you gave me ?
I've tried the other answer from Douglas C. R. Paes using a JS script. But if i change by this script, all versions will be at this number.
what could be awesome is : when i want to up a new version of a document, I can choose the up version.
Thanks a lot again for your support,
best regards,
Thomas
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.