Can script runner be used to show an icon (top right - next to three dots) if a page has inline comments?

I don't see any obvious ways to quickly see if a page has inline comments and I wonder if an icon can be shown if it does have inline comments?

When the icon is clicked it will naviagate to the first comment.

1 answer

1 accepted

Hi Vijay,

My name is Rafael Franco and I'm the Tech Lead for the Product Team here at Adaptavist. Thanks for using ScriptRunner for Confluence.

Definitely ScriptRunner for Confluence can help you with that. I would suggest you use a Script Fragment and in that fragment you can fetch the inline comments by:

final List<Comment> comments = commentManager.getPageComments(pageId, new Date(0));
final List<Comment> inlineComments = new ArrayList<Comment>();
for (final Comment comment : comments)
{
    if (comment.isInlineComment())
    {
        inlineComments.add(comment);
    }
    /* More over, you can check the status of an inline comment by doing something like this:    
        comment.getStatus().isDangling()
        comment.getStatus().isOpen()
        comment.getStatus().isResolved()
        comment.getStatus().isReopened()
    */
}

Let me know if it helps.

Rafael

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

71 views 0 4
Read article

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