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

Andreas Haaken May 21, 2012

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?

5 answers

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 16, 2018

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);
} 
1 vote
Steffen Stamprath
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 8, 2015
0 votes
Priyanka Lavania
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 16, 2019

Hi Andreas,

You can do it using built in scripts from script runner to bulk delete comments from one or more pages, you can also specify comment age or delete all. Hope this helps.

See this for more details: - https://scriptrunner.adaptavist.com/5.0.5/confluence/builtin-scripts.html

Regards,

Priyanka Lavania

0 votes
Matthew J. Horn
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

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

0 votes
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

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.

Andreas Haaken May 21, 2012

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

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 21, 2012

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events