This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Document Stats Report Macro

Overview

The Document Stats Report is used to display a count of the content currently in each workflow state.

This workflow information in the reporting columns will by default include 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, to filter the display to specific states or the states in one or more workflows.

Once added to a page, the report macro will dynamically update the count of the states.

Permissions

Anyone can see this report.

View-only users will only see results for content that has reached a Published ( final=true ) state, even if there are subsequent draft state edits to that content. Content that has not yet been published, or content under a workflow that does not define a published state, will not be shown.

Admins can make all results available to everyone by changing the  Workflow Activity and Drafts Visibility setting.

Adding the report

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

In the draft page editor,

  • choose Insert  → Other Macros → Reporting → Document Stats Report

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

     

  • choose  Edit the macro

     

  • choose report filters and display column settings

    • if necessary, scroll down the macro editor to add/edit report filter options

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

  • choose Save to update the macro on the draft page

  • choose Update to add the report to the 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 will display the state information for content with each label. If you wish 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 be also be customized for

  • one or more states

  • one or workflows

Filter the report

In the macro editor select options to filter the report. These include options to 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.

Note that if a workflow has been removed from content that is in the scope of the report macro, but the history has been retained, the report will show the last state information for the content.

Report filters

The filters are listed alphabetically in the macro editor.

Setting

Default

Notes

Setting

Default

Notes

Label

none

Should the report be filtered by content label(s)?

  • leave empty to include all content

  • list one label name to filter to specific label

  • list multiple label names, separated by commas, to filter to content with any of those labels

If using a list of labels, you can prefix the list with  &(ampersand) to require that content has all the labels. Otherwise, it will report pages containing any of the listed labels.

Parent page

blank (current space home page)

Report limited to child pages only of the space home page or specified page.

  • leave empty to include all content in the space (does not include the home page as this is the default parent)

  • use @self to  report on the child pages of the current page

  • specify a page title to include only its child pages

 If specifying a parent page you cannot list multiple space keys. The report will default to the child pages of the added parent page.

In space

blank (current space)

The comma-separated list of space keys to filter.

If multiple spaces are specified, the table will count all content



States(s)

blank (all states)

A comma-separated list of states to be displayed in the report. The report displays the count for all the content in each state in the scope of the macro editor settings.

  • leave empty to include all content in all states

  • limit report by listing one or more state names in a comma-separated list

  • states displayed in the report are listed in the order added to the macro (only from v6.16.4+)

The report will include the state count for content where the workflow has been removed but the workflow history has been retained

Workflow(s)

blank (all workflow states)

A comma-separated list of workflows to be displayed.

  • leave empty to include all content in all states in all workflows

  • limit report by listing one or more workflow titles in a comma-separated list

 If left empty the report will display all a report for states in both space and page workflows in the scope of the report. However, you can only specify space workflow names. There is no option to specify a page workflow name.

If left empty then the report will include the state count for content where the workflow has been removed but the workflow history has been retained

Reporting columns

The column display order on the page is defined by the order of entry of the state name column in the macro editor.

The document-stats-report macro can be added to the Confluence chart macro to display the report information.

 

The Confluence Chart macro display is based on the document-stats-report macro filters

The Chart macro assumes the first column, 0, is a series name, but the Document Stats Report macro uses it for the first state.

To ensure that the information for the first state from the Document Stats Report macro is displayed in the chart

  • in the Chart macro Columns setting add the number 0 (zero)

  • then enter a comma-separated list of the states you want to display (the Document Stats Report column headings)

For example, to display the following four workflow states EditingApprovedPublished, In Progress, in the macro editor for the Confluence Chart macro add the following to Columns dialog box

  • "0, Editing, Approved, Published,  In Progress"

This will display a total of 4 columns or 4 pie segments.

Why are old states shown?

If the table shows states from old Comalatech workflows that are no longer used, purging the space trash should solve the problem (deleted pages in the trash retain their workflow information).