We have a user mentioned on each page in a particular space which is used for our comala approval workflows.
We are facing an issue where an employee who was an owner on hundreds of pages has left the company and now we need to open each page and change their user mention to whoever now supports that product in our department.
Is there a way to use Power Scripts for Confluence to read all pages in a space for a particular user mention and then update it to another value?
Thanks in advance.
Kat
You could use the selectPages routing to get a list of the pages in the your space and then loop though that list for each page. The below code is from their documentation ... modified slightly to edit the page content. You will need to know what the portion of the storage format is that you want to change. You should try this out in a full copy test version of your production system before kicking it off.
string cql = "(type=page and Space=DEV)"; number [] pages = selectPages(cql); for(number p in pages) { %p%.content = replace(%p%.content, "", "");
}
https://anovaapps.atlassian.net/wiki/spaces/PSCONF/pages/1840928/selectPages
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.