Document Stats Report Macro

Overview

 

The Document Stats Report macro displays a count of the content currently in each workflow state.

By default, the workflow information in the report columns includes all the workflow states in the current space (except for the space homepage).

One or more filters can be added to the document-stats-report macro, for example, filter the display to specific states or states in one or more workflows.

Once added to a page, the report macro dynamically updates the count for each state.

Permissions

Anyone can see this report.

View-only users only see results for content that has reached a Published ( final=true ) state, even if there are subsequent draft state edits to that page or blog post.

Pages and blog posts that have not yet been published or have an applied workflow that does not define a published state are not shown.

Administrators can make all results available to everyone by changing the  Workflow Activity and Drafts Visibility settings globally for the instance or in each space.

Adding the report

To add the report to a page choose the Document Stats Report macro.

In the draft page editor, either

  • open the macro editor

    • choose the Confluence header option → Other Macros → Reporting → Document Stats Report

    • choose Insert

  • type {document stats ...  on the page and select Document Stats Report

cdmdc_documentstatsreport_openmacrobrowser.png

Configure the macro settings:

  • choose  Edit the report macro

In the macro editor

  • choose report filters and display column settings

    • scroll down the macro editor to add or edit report additional filter options

By default, the report displays a count for all workflow states including those where no content is currently in the state (count is zero).

  • choose Save to update the macro on the draft page

  • choose Update to add the report to the published page

 

Here's how the report looks on your page.

Customizing the report

Edit the Document Stats report macro to customize the report by

You can choose to filter the state count for the content by

  • label(s)

  • parent

  • space(s) using the spacekey

If multiple labels are added the report displays the state information for content with each label.

To display information for content that must have all the specified labels, add the & (and ampersand) operator in front of the first label in the list

The macro can also be customized for

  • one or more states

  • one or workflows

Filter the report

In the macro editor select options to filter the report. Options include filter by state, space key, label, parent page, and workflow (see table below).

For example, add a filter on the State(s) filter using Published

The filtered report displays only the content with the named state, Published.