Episerver has a feature called Episerver Projects that allows editors to work and collaborate on a number of changes that are grouped together into projects. This is allows multiple changes to be made to a site that can be previewed and all published at once which is useful for things like campaign launches and site updates. This is a great feature but more than once in the Episerver Forums I have heard of the requirement to revert all changes made in a project.

Thinking about this, an approach could be to create another project to revert the changes made by a project. This allows editors to quickly get back to the state before the project was published. The code to achieve this can be found over at the following Gist: https://gist.github.com/davidknipe/d64f9d9993443fd5443c6a6a9f6dae13 and does the following things:

  1. When a project is created it automatically creates another project called "[project name]_undo"
  2. When items are added to the original project another draft is automatically created and added to the undo project
  3. When items are removed from the original project this is also removed from the undo project too

Seeing it in action

The overall affect is that editors can do their work and if they want to "undo" a project they can switch to the undo project, review changes and publish the entire project to get back to the original state. The video below shows it in use:

Suggestion

My personal suggestion would be that editors review the undo project items and decide whether they want to undo the whole project or elements of it as some content items may have been changed since the original project was published.


Comments

Recommendations for you