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

How can I decide the page has inline comment or not?

Péter Hendlein September 21, 2015

At this moment I go to a page, and sroll down it slowly (sometimes very slowly), and I search text with yellow background. In the page menu I can find resolved comments, but the unresolved is very important for me if I'm the page creator.

4 answers

2 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.
September 23, 2015

While it is not so easy to get that information, it is not impossible smile

While you are logged into Confluence and looking at any page, you should paste this code into the javascript console (accessed in your browser by pressing F12 or Ctrl/Cmd+Shift+i).

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!");
            }
        }
    });
}

You then need to run the code by entering:

getUnresolvedInlineComments()

This will search for all unresolved comments on pages you have created in your entire Confluence instance.  Depending on how many comments you have in your system, this may take a while.  It will output "Done!" when finished.  The pages will be output to the browser console and you should be able to click on them (or copy/paste) to jump directly to the comment.

To look in another space, run it like this:

getUnresolvedInlineComments("ds")

This will search in the space with the space key "ds".  To search on pages created by another user, run it like this:

getUnresolvedInlineComments("", "username")

This will search all pages for unresolved comments on pages created by the user with the username of "username".  You could combine both of these as well:

getUnresolvedInlineComments("ds", "username")

This will search all pages in space "ds" created by the user with the username "username" for all unresolved comments.

This should work for both Cloud and Server.

EDIT: Updated the code to fix some issues, thinking about turning it into a real addon.

Deleted user August 29, 2016

Unfortunately this returns also replies to inline comments that are already resolved: an inline comment reply has a status on its own, but it doesn't get resolved when the initial inline comment itself gets resolved. I tried to figure out a distinct property of those replies, but wasn't able to find one so far... Any idea?

James Batey November 11, 2016

@Stephen Deutsch 

This is a great way to identify unresolved comments, if using a server instance (and unable to try the suggested plugin). Is it possible to via javascript to filter the inline comments to only those where the parent comment is open?

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.
October 30, 2016

A Cloud addon was recently released that would help with this:

See All Unresolved Comments

Not only do you get a counter at the top to see how many unresolved inline comments are in a page, but you can also click to jump directly to the first comment. You can even search (run a report) to see all unresolved comments filtered by space and/or commenting user. For longer pages, there's also an overview report that shows just the headings and the commented text, so you can get a quick overview of what's on any particular page.

0 votes
TomC
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 21, 2015

And  CONF-36933 - Improve Inline Comments NEW  as well.  I recommend voting for these requests. 

.

0 votes
Bharadwaj Jannu
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.
September 21, 2015

I think it is a new feature requests here:

CONF-36602

CONF-34510

Hope this helps!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events