Hello everyone! 😃
Following up on my colleague @Jonny Carter's blog post about how to use ScriptRunner to bulk update content contained within Confluence pages, I figured I should come back and write about a feature we recently released in ScriptRunner that makes bulk updating macros incredibly easy.
We spent a significant amount of time developing this with the hope that it will save you the hassle and time required to manually edit pages. 😃
In a large Confluence instance where a macro is used hundreds of times across many pages, Update Macro helps Confluence admins to:
Update Macro works on native Confluence macros and third-party macros alike. It is simple to use and doesn’t require any scripting, but there is an option for scripting if needed.
Our script is a potential answer to the feature request Atlassian has open that describes user's desire to easily update or change many macros at once.
Once you've installed a version of ScriptRunner which has the Update Macro script, you can simply locate it by visiting the Built-in Scripts page within ScriptRunner.
After clicking on the script, you'll see several fields.
Enter a CQL Query to find pages or blogs where you want the macro updates to take place.
In Macro Parameter(s), add which parameters you want to update.
When you select your parameters, the corresponding fields appear.
For example, you'd get the following fields if you selected parameters for the Confluence's Blog Posts macro:
We have developed this script so that users get dynamically generated fields that make sense in relation to the macro parameters that are selected. For example: the Restrict to these Authors parameter for the Blog Posts macro will generate a User Picker field, because you'll need to select users.
Simply click Run after filling in the fields and all found macros will now be updated! 🎉 🎉
Joshua Yamdogo _ AdaptavistRising Star