Document States Report Macro
Overview
The Document States Report Macro displays pages and blog posts with an applied workflow and associated workflow state information. The displayed report includes live filter options to display pages by workflow and the workflow state.
The report macro is configured in the macro editor to
choose the displayed report columns
add report filters
Once added to a page, the report macro dynamically updates the displayed information. It's great for keeping track of content workflow states across multiple spaces.
From v7.3.0, use the Document Approvals Report Macro to display approvals in the state and approval information including reviewers and decisions. Approval information and filters for the approval name, approval status, and approval assignees are available in the document approvals report macro.
Permissions
Anyone can see the report, but the information displayed is filtered by the user permissions for the pages and the workflow state.
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. A page that has not yet been published, or a page with an applied workflow that does not define a published state, are 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 States Report macro either by
using the macro editor on the draft page by choose Insert → Other Macros → Reporting → Document States Report
or on the draft page type {Document States ... and select Document States Report
Publish the page to view the default report.
The default report displays workflow state information for content with an applied workflow (or history of an applied workflow) in the current space.
From v7.2.1 DATA CENTER the document states report displays a date value as an exact date only.
Moving the cursor over the report on the page displays an option to Refresh Data for the report From v7.3.0
Choosing this option opens the space tools Refresh Data dashboard. This option refreshes the workflow properties data used by in-app reports and report macros. This option is displayed in the macro editor by moving the cursor over the report preview.
Editing the macro
On the draft page
choose Edit the macro
In the macro editor to configure the report display. By default
columns displayed are the comma-separated list title, state, changed, updated by, updated
the report displays 20 items per page
sort order of report is descending on the page Title column
scroll down the macro editor to add/edit report filter options
CQL filter
label
parent page
states
space(s)
workflow(s)
choose Save to update the macro on the draft page
choose Publish or Update to add the report to the page
Here's how the default report looks on your page.
Mouse over the report to display the report dropdown menu button options to filter the page display by Workflow and/or State.
The displayed report can also be sorted alphabetically/chronologically on a selected column.
Customizing the report
Edit the Document States report macro to customize the report by
choosing the information to be displayed in each column of the report
adding one or more filters
Customize the displayed columns
In the macro editor amending the listed columns to title, state, changed
Displays the page, the current state, and the date of last state change.
Columns in the report can also be configured to display state approval information, for example
approvals
approval status
approved version approvers
approved version date
This displays the following report on the published page.
Filter the report
In the macro editor select options to filter the report. These include options to filter by state, space key, label, workflow or CQL filter (see table below).
For example, add a filter on the State filter using Draft
The filtered report displays only the page(s) currently in the named state, Draft.
The report macro can also filter approvals on approval status and approval assignee.
Report filters
The filters are listed alphabetically in the macro editor.
Setting | Default | Notes |
|
---|---|---|---|
CQL Filter | blank | A comma-separated list of CQL filters - the values must be indexed. For versions v6.16.7+ the CQL format is For CQL field references |
|
Label | blank | Should the report be filtered by content label(s)?
If using a list of labels, you can prefix the list with |
|
Number of items to display | 20 | The maximum number of results to show per page
|
|
Parent page | blank |
The report does not include the parent page. |
|
Sort | Title | Sort defines the value to sort by with the following options
| v7.2.1+ DATA CENTER |
Sort Order | ascending | Sort Order defines the order of the sorting as either
| v7.2.1+ DATA CENTER |
Spaces(s) | @self | The comma-separated list of space keys to filter.
Specifying more than one space or all spaces disables live filtering. |
|
State | blank | Should the report be filtered to a specific state or state(s)?
|
|
Workflow(s) |
| A comma-separated list of workflows to be displayed. |
|
Reporting columns
All columns except Page Title can be added or removed from the displayed report. The column display order on the page is defined by the order of entry of the column in the macro editor.
The default column entry for the column display is
title,state,changed,updated by,updated
These can be used to provide parity of report display when choosing to display state approval information.
The following columns are sortable in the UI of the report (from v6.16.6+)
Title
Created
Due date
Read Confirmation
State
Updated
Created by
Workflow
The document states macro has two parameters to define the sorting of the report (from v7.2.1 DATA CENTER )
Sort: defines the value to sort by with the following options
Title
Updated
Created
Created by
Sort Order: defines the order of the sorting as either
ascending
descending
Report Column Entry | Description | Version |
---|---|---|
title | Page title (always displayed) | 6.13+ |
approvals | Approval(s) in the current specified state
Click each approval icon to show the assigned user(s) | 6.13+ |
approval status | Displayed as an approval status lozenge
If no approval is present in the current state, no approval status is displayed | 6.13+ |
approved version | The approved (final state) page version | 6.16+ |
approved version approvers | The user(s) that caused the page to enter the final state | 6.16+ |
approved version date | Date and time the approved (final state) was approved | Date and time v7.2.1+ Duration 6.16+ |
changed | Date and time of the last state change | Date and time v7.2.1+ Duration 6.13+ |
changed by | The user that caused the page to enter the current state. In the case of a content review with multiple approvers, this is the final approver. A comment added on a state transition is included in the column entry (from v7.6.1 Data Center). | 6.13+ Include state transition comment 7.6.1+
|
created | Date and time of the page creation | Date and time v7.2.1+ Duration 6.16+ |
created by | The user that created the page | 6.16+ |
due date | Date and time of the state expiry | Date and time v7.2.1+ Duration 6.16+ |
readack status | Status of read confirmation:
| 6.16+ |
state | The current state of the content with the state icon | 6.13+ |
space | The name of the space that the page is in | 6.16+ |
updated | Date and time of the last page edit | Date and time v7.2.1+ Duration 6.13+ |
updated by | The user that last edited the page | 6.13+ |
workflow | The workflow applied Although page workflows are displayed in the unfiltered report you can only filter this column on space workflow names. There is no option to filter on-page workflow names. | 6.16+ |
Exporting the page
The document states report macro is rendered when a page including the macro is exported to PDF, Word, HTML, or using the macro in a send-email action macro in a workflow trigger.
The following columns (when included in the report macro configuration) are supported when exporting the page.
Report Column Entry | Export render | Version |
---|---|---|
title | Page title with full link (including host Confluence instance name) | 7.2.3+ |
approvals | Not displayed |
|
approval status | Not displayed |
|
approved version | Version number in format - v1.1.0
| 7.2.3+ |
approved version approvers | Comment separated list of usernames that approved the page | 7.2.3+ |
approved version date | Duration since the approved (final state) was approved | 7.2.3+ |
changed | Date in the preferred format of the user | 7.2.3+ |
changed by | Username
Includes any comment added by the user on the state transition (from v7.6.1 Data Center) | 7.2.3+
State transition comment 7.6.1+
|
created | Date in the preferred format of the user | 7.2.3+ |
created by | Username
| 7.2.3+ |
due date | Date in the preferred format of the user | 7.2.3+ |
readack status | Status of read confirmation:
| 7.2.3+ |
state | The current state of the content | 7.2.3+ |
space | Space name with link. | 7.2.3+ |
updated | Date in the preferred format of the user | 7.2.3+ |
updated by | Username
| 7.2.3+ |
workflow | Applied workflow name | 7.2.3+ |
When rendering the exported table for the macro, the document states macro filter settings are used to display the rendered report
Columns
CQL filter
Label
Number of items to display
Parent page
Spaces
States
Workflows
Sort
Sort order
Send-email trigger export example
The following is an example of a workflow trigger to export the document states report on the change of the applied workflow state to In Progress.
{trigger:statechanged|state=In Progress}
{send-email:user=admin|subject=Doc States Report}
{document-states-report}
{send-email}
{trigger}
All examples
Related pages