cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot revert version

oliverspecht
Champ in-the-making
Champ in-the-making
Hi,
I am trying to revert the version of a Content Item but it does not work.

When I click on the "Details" button, I see all versions but when reverting via Authoring Webservice, nothing happens. I also do not see any "Revert" action in the "Details" view, which might indicate I use a wrong version of Alfresco? Wrong Space or something?

I can create new versions and download older versions, that is no problem. only reverting does not work.

Can anyone help me out?

Thanks,
Oliver
2 REPLIES 2

oliverspecht
Champ in-the-making
Champ in-the-making
Do you need more information? Or is there no answer? Smiley Happy

jottley
Confirmed Champ
Confirmed Champ
There is no OTB UI function to revert to a previous version in Alfresco.

It can be done programmatically like this: get versionHistory of the node, get the version you want to revert to and re-add that version as the latest version.  This does not of course remove any history between the current version and the point you want to revert to.

You could possibly delete the versions from the versionHistory between those two points (meaning that you would not need to do a get and re-add that node).  I've never tested this to confirm that it works.

(For example of working with versionHistory look at the code from the Max Version Policy (http://code.google.com/p/alfresco-maxversion-policy/)

Jared