Listing open and resolved comments from each page in a space

Scenario

In this recipe, we'll build a report that lists the number of open and resolved comments in each page in a space.

Result

Recipe

Apps

Reporting for Confluence Server & Data Center

Apps

Reporting for Confluence Server & Data Center

Level

Advanced

Estimated time

20 minutes

Macros

And Filter, Content Reporter, Grouping Reporter, Report Column, Report Info, Report Table, Text Filter

Suppliers

Collection Supplier, Comment Supplier, Page Supplier, Space Supplier

Storage format

You can copy and paste this code into the Confluence Source Editor:

Not available.

 

Macro structure

You can recreate the example in the editor view:

Steps

  1. Create a Report Table macro.

  2. Within the Report Table macro, create a Content Reporter macro and set Types to "page". 

  3. Inside the Content Reporter macro, create an And Filter macro.

  4. Inside the And Filter macro add a Text Filter and set Key to page:all comments>collect "inline-status" and tick the Required checkbox.

  5. Add another Text Filter and set the following:
    Key to page:all comments>collect "inline-status"
    Exclude to .*Dangling.*
    Tick the Required checkbox.

  6. Inside the Report Table macro, create a Report Column macro and set the Title to "title/page".

  7. Within the Report Column macro, add a Report Info macro and set the Key to page:title and Link to True.

  8. Inside the Report Table macro, create a Report Column macro and set the Title to "# Open Comments". 

  9. Within the Report Column macro, add a Report Info macro and set the Key to page:all comments>collect "inline-status">join with " ">find "Open">size

  10. Inside the Report Table macro, create a Report Column macro and set the Title to "# Resolved Comments". 

  11. Within the Report Column macro, add a Report Info macro and set the Key to page:all comments>collect "inline-status">join with " ">find "Resolved">size