Change Content Author

Using this built-in script, you can change the author of Confluence content, like pages, blog posts, comments and attachments. You can only change the original Created By author; the Page History and the Last Modified authors of the content are unmodified after this script runs. 

Run the script

Follow these steps to run the built-in script:

Regardless of the space where you run this script, it affects every space where you are a space admin unless otherwise specified in the CQL query.

  1. Navigate to General Configuration > ScriptRunner > Built-In Scripts
  2. Select Change Content Author.
  3. Enter a CQL statement to identify what content and users you want to work with in CQL Query.

    CQL tips

    • CQL autocomplete is available on this field. Start typing to see possible CQL statements.
    • See the CQL Guide for help with CQL. 
    • Click Show Examples to reveal more CQL examples.
  4. Select the author to work with by using their username in New Authors.
  5. Select Run.

    You can select Preview instead of Run to view changes before implementing them.

Results: Once you select Run, the Results of the script appear in a bulleted lists letting you know what was updated

Example

Let's say your product team had a brainstorming week in a particular space, called Development Planning (spacekey is DP). During a refinement meeting, the team decided what ideas would be put on the roadmap and labeled them with product_roadmap. Now, you want your tech lead to be assigned to all of those different pages, blogs, and attachments with that label. Follow these steps to change that original content author: 

  1. Navigate to General Configuration > ScriptRunner > Built-In Scripts
  2. Select Change Content Author.
  3. For CQL Query, enter space = DP AND label = product_roadmap.
  4. For New Author, enter tech_lead
  5. Select Run

Results: Each page in the Development Planning space that was labeled as the product_roadmap are now assigned to the tech_lead as the original content author, no matter who they were created by. 

On this page