cancel
Showing results for 
Search instead for 
Did you mean: 

Keep only n versions of document

framtk
Champ on-the-rise
Champ on-the-rise

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.

1 ACCEPTED ANSWER

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.

Hyland Developer Evangelist

View answer in original post

29 REPLIES 29

angelborroy
Community Manager Community Manager
Community Manager

Check this addon Alfresco Max Version Policy | Alfresco Add-ons - Alfresco Customizations

It should work for current Alfresco versions.

Hyland Developer Evangelist

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...

Hyland Developer Evangelist

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.

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.

Hyland Developer Evangelist

Thanks, can you link me how to rebuild the AMP please?

Just type "mvn package" from project root and AMP file will be generated in "target" folder.

Or you can download release including 5.1 support from Release Support for 5.1 · angelborroy-ks/alfresco-maxversion-policy · GitHub

I've included that while Jared updates main project.

Hyland Developer Evangelist

Thank you very much Smiley Happy

I have another problem now, after trying to install your version the amp installer still says that i have the version 0.0.8 installed and trying to connect to tomcat will result on 404 on both /share and /alfresco