Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

View all open comments on a Confluence page

Viewing page 2 of 2

28 answers

0 votes
Stephen Deutsch
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.
November 3, 2015

I realized there was a bug that caused it not to work on Cloud (and also it was set by default to filter by username), so I fixed the issue, here is the updated code:

var getUnresolvedInlineComments = function(space, username, start) {
    start = start || 0;
    var spacePart = "";
    if (space) {
        spacePart = "space%3D" + space + "%20and%20"
    }
    jQuery.ajax({
        url: contextPath + "/rest/api/content/search?cql=" + spacePart + "type%3Dcomment&expand=extensions.resolution%2Ccontainer.history&start=" + start,
        success: function(response) {
            jQuery(response.results).each(function() {
                if (this.hasOwnProperty("extensions") && this.extensions.location === "inline" && this.extensions.resolution.status === "open" && (typeof(username)==="undefined" || this.container.history.createdBy.username === username)) {
                    console.log(AJS.params.baseUrl + this._links.webui);
                }
            });
            if ( !(response.size < response.limit) ) {
                getUnresolvedInlineComments(space, username, start + 25);
            } else {
                console.log("Done!");
            }
        }
    });
}

This is a bad workaround for the time being, so I think I will take some time and turn this into a real addon, which should make things a lot easier.

0 votes
Lee Cash November 3, 2015

Hi Stephen, 

This solution is only applicable to self-hosted versions of Confluence, right? I can't use scripting on the Cloud version. Unless I'm misinterpreting your suggestion in https://answers.atlassian.com/questions/30540804

Regards,

Lee

Stephen Deutsch
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.
November 3, 2015

Hi Lee, it works just fine on the cloud version too. It is simply a piece of Javascript that you paste into your browser console, so it's your browser doing the scripting, not a Confluence page :)

0 votes
Stephen Deutsch
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.
November 3, 2015

Hi Lee,

for one way to get all unresolved inline comments, you can take a look at my answer from another question:

https://answers.atlassian.com/questions/30540804

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events