Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmlewis/3ddb180afe9f4e9f9157 to your computer and use it in GitHub Desktop.
Save cmlewis/3ddb180afe9f4e9f9157 to your computer and use it in GitHub Desktop.
Alfresco - Automate creation of many major and minor versions
var numMinorVersions = 15;
var numMajorVersions = 2;
for (var i = 0; i < numMinorVersions; i++) {
document.createVersion("automated minor version", false);
}
for (var i = 0; i < numMajorVersions; i++) {
document.createVersion("automated major version", true);
for (var j = 0; j< numMinorVersions; j++) {
document.createVersion("automated minor version", false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment