---
title: "Document Approvals Report macro"
canonical: "https://support.appfire.com/space/CDALS/742326668/Document%20Approvals%20Report%20macro"
format: markdown
---
> Macro (aura-html)

> Macro (excerpt)
> 
> Configurable page report macro displaying information for current approvals in progress including assignees and approvers

## Overview

[v2.1.0+ Data center] 

The **Document Approvals Report** displays a list of pages and blog posts with associated workflow approval information for the current state of approval workflows applied to pages.

![cdadc_documentapprovalsreport.png](media://d40baa97-bbf6-4860-9f66-2fd0d744d501)

The information in the reporting columns for the default report is

- **Page Name** - includes a link to the page with the applied workflow with the approval
- **State** - workflow state containing the approval (either the **Review** or **Rejected **state for the approval workflow)
- **Last page update**
  - an avatar for the user who last updated the page
  - the date of the last page update
- **Approval name **- the name of the workflow state approval
  - in Comala Document Approval the approval name in both the **Rejected** and **Review** state is **Review this page**
- **Approvers** - avatars of users who have approved or rejected the named approval appended with an icon for their most recent approval decision
- **Pending Approvers** - avatars of users assigned to the approval as a reviewer and are yet to undertake an approval decision
- **Status**
  - the approval status
  - the page version of the latest approved version (if this currently exists) linking to the latest approved page version

> 📝 The report displays **Pending** approvals only. The document approvals report does not show entries for a page with a completed approval as the applied workflow approval has moved to a new state.

The report macro can be customized in the macro editor by choosing

- displayed [columns](https://appfire.atlassian.net/wiki/spaces/CDALS/pages/742326668/Document+Approvals+Report+macro#Reporting-columns)
- one or more f[ilters](https://appfire.atlassian.net/wiki/spaces/CDALS/pages/742326668/Document+Approvals+Report+macro#Report-filters)

Once added to a page, the report macro dynamically updates the displayed information. It's great for keeping track of content workflow approvals across multiple spaces.

## Permissions

Anyone can see this report. The report only shows information that matches the current user permissions for the page, blog post, and workflow state

Admins can make all results available to everyone by changing the [Workflow Activity and Drafts Visibility](https://appfire.atlassian.net/wiki/spaces/WLSD/pages/613684523) settings. This is set in the current space configuration or for all the spaces in an instance in the global configuration.

## Adding the report

To add the report to a page

- select and add the **Document Approvals Report** macro to a draft page
- publish the updated page

This is done by either

- selecting **Insert ** **→ Other Macros → Reporting → Document Approvals Report**

![cdadc_macroeditor_documentapprovalsreport.png](media://fd365053-79ba-4441-88a6-397b7338d60c)

- typing **{Document Approvals ...** and select** Document Approvals Report**

![cdadc_choosemacro_draftpage_documentapprovalsreport.png](media://2eaa15f7-efbf-42d9-8d7a-92d57cbbd166)

Edit the configuration in the macro in the editor or choose **Save** to use the default macro settings.

- **Publish** or **Update **the page to view the default report on the page

![cda_documentapprovalsreport_onpage_3entries.png](media://b6e557f1-05f4-41f9-8bce-b16608f96b60)

The default report displays information for current workflow approval for pages and blog posts with an applied workflow in the current space.

Report filters and the **Data Refresh** option are displayed by moving the mouse over the report entries.

> 📝 The **Refresh Data** option opens the[ space Refresh Data dashboard](https://appfire.atlassian.net/wiki/spaces/CDALS/pages/649659081). This space dashboard repopulates data properties for pages and blog posts with an applied workflow in the current space. This data is used by the Comala Document Approval [in-app reporting tools](https://appfire.atlassian.net/wiki/spaces/CDALS/pages/649823076) and the [report macros](https://appfire.atlassian.net/wiki/spaces/CDALS/pages/649560338).

## Editing the macro

On the draft page

- select the macro
- choose** Edit**

![cda_documentapprovalsmacro_draftpage_edit_select.png](media://bc494e52-1d9e-4e37-8753-9eeeb84c762e)

The macro editor displays the document approvals report macro configuration options and a preview of the default document approvals report for workflows applied in the current space.

![cda_documentapprovalsmacro_,macroeditor_2entries.png](media://59ccf5e1-8a51-4902-bb71-7f1c26dd2b53)

Configure the report filters and column display settings In the macro editor.

Mouse over the preview to display the on-page filter buttons and the option to **Refresh Data **for the reports.

![cda_documentapprovalsmacro_,macroeditor_2entries_refreshdata_option_displayed.png](media://77edb9bd-1a3c-4fed-aa39-303d8c5f051f)

 The filter and display options are alphabetically displayed in the left-hand scrollable panel.

- the report filter options are
  - **Approval name**
  - **Approval status **(only if approval name is specified)
  - **Assignee - **use **@self **to display the current user viewing the report reviewer assignments
  - **CQL** filter
  - **Label(s) - **comma-separated list of one or more labels to filter
  - **Parent page** - defaults to the home page of the current space
  - **Ancestor page** - reports of ancestor pages of a specified page
  - **Space(s) - **default is **@self **for the current space
  - **Workflow(s) - **comma-separated list of workflow names to filter for the report

> 📝 The report displays current approval information. In the Comala Document Approval workflow, approvals that are rejected or approved (all assignees undertake the approval and agree on the approval decision) move to a new state. These completed approvals are not displayed in the report hence only **Pending** approvals are displayed in the report.

The display options for the filtered report are

- **columns** displayed
  - by default, the comma-separated list **title**,** state**,**approvers**,**pending approvers,last page update,status**

![documentapprovalareport_macroeditor_extract_columns_info.png](media://26433861-af85-4498-ba21-09f0782b1bee)

- **Number of items to display** - the default setting is 20 items per page

On configuring the report macro filters and display options, choose

- **Save** to update the macro on the draft page
- **Publish** or **Update** the draft page to add the report on the published page

## Customizing the report

Edit the **Document Approvals report** macro to customize the report by

- choosing the information displayed in each column of the report
- adding one or more filters

### Reporting columns

All columns are displayed in the default report.

![cdadc_documentapprovalsreport_onpage_onentry_allcolumns.png](media://ee3f372c-2783-4fd7-88c0-d9071dceeadb)

Three columns are always displayed in the order below, from left to right, in the rendered report.

- **Page Name**; **State**; **Last page update**

![cda_documentapprovalsmacro_columns_mandatory_firstthree_plus_status.png](media://b4338664-612c-494f-8c9a-22225929f3d9)

The display and order of other columns in the report can be customized in the macro editor.

| Report column macro editor | Report Column Name | Notes |
| --- | --- | --- |
| **title** | **Page Name** | Name of the page with the applied workflow that includes an approval.<br>> ℹ️ This column is always displayed in the report and is displayed as the first column in the report. |
| **state** | **State** | The workflow state that includes the named approval. Entry displays the<br>- state name
- state indicator circle<br>> ℹ️ This column is always displayed in the report and is the second column in the report. |
| **last page update** | **Last page update** | - Avatar of the user who last updated the page
- date of last page update<br>> ℹ️ This column is always displayed in the report and is the third column in the report. |
| **approval** | **Approval Name** | Approval name<br>> 📝 This is the approval in the workflow state displayed in the same line of the report. |
| **approvers** | **Approvers** | User(s) who have undertaken an approval decision for the named approval<br>- user avatar displayed with icon appending depicting the most recent approval decision for that use (tick - approved; cross - rejected) |
| **pending approvers** | **Pending approvers** | User(s) assigned to the approval and have not yet undertaken an approval decision for the named approval<br>- user(s) avatar |
| **status** | **Status** | Approval status<br>- Pending<br>> ℹ️ Only **Pending** approvals in an applied Comala Document Approval workflow are displayed. Approvals that  a **Rejected** or **Approved** status action a workflow state transition from the workflow state containing the approval.<br>If a transition to a workflow final state has occurred, the version number for the last approved version is displayed.<br>- this version number links to the last approved version of the page<br>> 📝 Only the approval status is displayed in the document approvals report macro editor preview. The version number entry in the report is only displayed on the published page. |

## Report filters

The filters are listed alphabetically in the macro editor.

| Report filter setting | Default | Notes |  |
| --- | --- | --- | --- |
| **Approval name** | *blank* | Name of the approval.<br>- add the approval name to use the **Approval Status** filter<br>> 📝 The approvals in the approval workflow all have the same name - **Review this page**. Approvals are in the **Review **and **Rejected **states. |  |
| **Approval status** | *blank* | *This only applies if an ****Approval name**** filter is specified.*<br>Filter by approval status from dropdown menu options<br>- **Any**
- **Pending**<br>Only approvals with a Pending status are displayed.<br>The following filter options are not for use with the applied Comala Document Approval workflow. Using these filter options does not display any data.<br>- **Approved**
- **Rejected**<br>These two filters are used when a custom Comala Document Management workflow is applied that includes more than one approval in a workflow state. |  |
| **Assignee** | *blank* | Name of the user assigned as an approver. Displays only approvals to which the user has been assigned as a reviewer or has already undertaken an approval decisions<br>- **@self** for the current user viewing the report on the page<br>**@self** displays only approvals assigned to the user viewing the page with the document approvals report macro |  |
| **CQL Filter** | *blank* | For CQL field references<br>- [Workflow CQL Fields](https://appfire.atlassian.net/wiki/spaces/CDML/pages/650250829)<br>> ℹ️ Filters can be added using Confluence CQL format and can include **OR** and comparison operators |  |
| **Label** | *blank* | Should the report be filtered by content label(s)?<br>- leave empty to include all content
- specify one label name to filter to that label
- list multiple label names, separated by commas, to filter to content with any of those labels<br>If using a list of labels, you can prefix the list with  `&`** **(ampersand) to require that the content has all the labels. O*therwise, it reports pages containing any of the listed labels.* |  |
| **Number of items to display** | 20 | The maximum number of results to show per page<br>- max is 200 |  |
| **Parent page** | *blank* | - leave empty to set the parent page as the home page for the space
- specify a page title to filter to its child pages<br>The report does not include approval information for the parent page.<br>> ℹ️ The** parent **parameter accepts the @self value reference. |  |
| **Ancestor page** | blank | The report is limited to the descendant pages of the specified page.<br>- use **@self** to report on the descendant pages of the current page
- specify a page title to include only its descendant pages<br>> 📝 If specifying an ancestor page, you cannot list multiple space keys. The report defaults to the descendant pages of the added page. | v2.4.0+ [DATA CENTER] |
| **Spaces(s)** | @self | The comma-separated list of space keys to filter.<br>- default is **@self** for current space
- list multiple [space keys](https://confluence.atlassian.com/doc/space-keys-829076188.html), separated by commas, to report on multiple spaces
- use **@all** to search all spaces<br>Specifying more than one space or all spaces disables live filtering. |  |
| **State(s)** | *blank* | Should the report be filtered to a specific state or state(s)?<br>- leave empty to report on all states
- specify one state name to report on that state
- list multiple state names, separated by commas, to report on specific states<br>The workflow states that including an approval in the Comala Document Approval workflow are<br>- **Review**
- **Rejected** |  |
| **Workflow(s)** | blank | Displays the Comala Document Approval workflow.<br>> ℹ️ No filter on a workflow name is possible if there has been no previous workflow activity using a workflow from an earlier installation and the use of an app from the Comala Document management family of apps. |  |

## Exporting the page

[V2.2.0+]

The document approvals report macro is rendered when a page including the macro is exported to PDF, Word, HTML.

> 📝 The document approvals report is also supported when exporting a page using
> 📝 
> 📝 - [K15t Scroll PDF Exporter for Confluence Cloud](https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=datacenter&tab=overview)
> 📝 - [Snapshot Publishing](https://appfire.atlassian.net/wiki/spaces/AHP/pages/650215885) feature in [Appfire Comala Publishing](https://marketplace.atlassian.com/apps/143/comala-publishing?hosting=datacenter&tab=overview)

The following columns (when included in the report macro configuration) are supported when exporting the page.

When rendering the exported table for the macro the document approval report macro filter settings are used when displaying the rendered report.

An example of the document approvals report macro rendered on a page exported to HTML is shown below.

![cdadc_documentapprovalsreport_export_html.png](media://20402755-3b6b-402d-b961-be5935213d5c)

> 📝 If the column choice exceeds 12, the rendered table may be displayed with columns transposed as rows to ensure fit on the exported page. Export also may generate additional table(s) in the rendered export when there are 12 entries or more.

## Related pages

> Macro (children)