Hi,
is it possible for alfresco to keep only the n most recent versions of a document and delete the older ones? I don't seem to see the option to do so on the alfresco web GUI.
When you try to install the module with "apply-amps", it says:
09130001 An error was encountered during deployment of the AMP into the WAR: 09130000 The module (Alfresco MaxVersion Policy) cannot be installed on a war version greater than 5.0.999. This war is version: 5.1.0.
You can modify following property at "alfresco-maxversion-policy/src/main/amp/module.properties" from project source code.
module.repo.version.max=5.1.999
Then you have to rebuild the AMP, and re-deploy the artifact.
BTW, I have deployed in 5.1.g and it works as expected.
Check this addon Alfresco Max Version Policy | Alfresco Add-ons - Alfresco Customizations
It should work for current Alfresco versions.
This doesn't seem to work. I just installed the amp but the limit isn't at 10 as the githum README states and changing the value inside global-properties does nothing. It probably because it says that it's updated for alfresco version 5.0 max while i have the version 5.1 installed
I haven't tested it with 5.1, but it seems that it should work.
Have you uploaded a new document and have you try to updated that document more than 10 times? It looks that this addon will save only 10 newer versions...
Yes, i tried uploading a new document and uploading a new version of it more then 10 times. right now i have 19 versions of the same document and all of them are downloadable and reversible. I tried with both the default 10 and by witing maxVersions=n inside global-poperties as he says but nothing changes.
Maybe there is just a check that blocks it if the version is above 5.0 but i'm not familiar with alfresco and java in general so iwouldn't even know where to search for it.
I've updated the project to include support for Alfresco 5.1. The latest release can be found athttps://github.com/jottley/alfresco-maxversion-policy/releases/tag/0.0.9
Excuse me, Jared. The problem related with your development is that Alfresco does not allow you to create more than 10 versions of one document? Like for example: If I upload 1 doc and I upload more than 10 major versions alfresco does not allow me to do that? Or what is exactly the problem?
I am asking you because I am a little bit confusing here: In 5.1.1 I've could upload till 13 different major version of one document. For sure it's something that I am not understanding properly.
Thanks in advance for the clarification!!
Cristina.
Alfresco by default allows you to have as many versions, both major and minor, of a document as you want. You may not want that. You may have policies where you may only want to keep the last 10 minor versions of a document or only the list 5 major versions. This add-on will enforce that rule. You choose the number of versions you want to keep, globally, for documents. So, for example, if you wanted to only keep the last 8 versions of documents in the repository the add-on will enforce that. Once you have uploaded the 9th version of a document the add-on will remove the oldest version(s) of that document until there are only 8 versions of the document.
Great! Thank you very much for your reply, Jared 🙂