This script will add a new label to all of the child pages of the selected parent page.
struct state { string name; string initial; string colour; string hideStates; string taskable; string changeDueDate; string final; } struct comalaState { string expand; string workflowName; state state; string [] messages; } if(space != "AS") { //Create request HttpRequest request; HttpHeader authHeader = httpBasicAuthHeader("jmuse", "M@tt_0518"); request.headers += authHeader; //Post data and get response comalaState cs = httpGet("http://localhost:8090/rest/cw/1/content/" + id + "/status", request); if(cs.state.name == "Archive") { addComment(id, "Moving page to archive space"); number archiveHome = getPage("AS", "Archive Space Home"); movePage(id, archiveHome); } }
See Other Recipes
See More Documentation