This script will move a page to a space to be archived when the workflow is put into a specific state.
Code Block |
---|
language | java |
---|
linenumbers | true |
---|
|
if(space != "AS" && comalaGetState(id) == "Archive") { //exclude from archive space and check state
addComment(id, "Moving page to archive space"); //adds comment to page
number archiveHome = getPage("AS", "Archive Space Home"); //gets id of the archive spaces home page
movePage(id, archiveHome); //moves page under the archive space
} |
See Other Recipes
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "comala" |
---|
|
See More Documentation
Filter by label (Content by label) |
---|
showLabels | false |
---|
showSpace | false |
---|
cql | label = "page_routines" |
---|
|