How do I delete many (or all) Comments on a Confluence Page?

We have several very long discussions on a Confluence Page, that we want to have deleted, after the things are finailzed. Is tehre a comfortable way to do this?

4 answers

1 vote
Alexey Matveev Community Champion Tuesday

Hello,

You could use the Power Scripts for Confluence add-on:

https://marketplace.atlassian.com/apps/1219507/power-scripts-for-confluence?hosting=server&tab=overview

I've found Power Scripts for Confluence really handy for Confluence admins who want to automate their work and apply bulk actions to Confluence. And it is a free add-on:

You could get all comments for a page and then delete them. Your script would look like this:

number pageId = 123456;
CComment[] comments = getComments(pageId);
for (CComment comment in comments) {
    deleteComment(comment.id);
} 

Hi Andreas,

You could do this with the Confluence Command Line Interface plugin - https://marketplace.atlassian.com/plugins/org.swift.confluence.cli - which has a removeComments (https://bobswift.atlassian.net/wiki/display/CSOAP/Documentation#Documentation-removeComments) command.

Would that work for you?

Andrew.

Thank you, but that will not be comfortable enough for our authors, as they need a web based way to do this..

Ah, ok. There are couple of open feature requests (https://jira.atlassian.com/browse/CONF-3902 and https://jira.atlassian.com/browse/CONF-5023) relating to bulk deleting comments via the web interface, but they haven't been implemented yet. Alternatively, anyone with the remove comment permission on a space can delete the comments one by one.

Andrew.

How about create a page that uses the SQL plugin. That would give you access to the comments.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Confluence

What are your project planning tips?

Hello Community,  Jessica here from the Confluence product marketing team! Today I wanted to get your takes on project planning –– what works, what doesn’t, how do you know if you’re doing it r...

327 views 2 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you