Overview

The CQL Filter parameter of the Document States Report macro now accepts Confluence CQL format functions, keywords, and can include OR and comparison operators (from v.6.16.7+).

(warning) prior to v6.16.7 CQL filter in report macros must be in the form FieldName:Value

(info) The only workflow CQL searchable fields are those listed in Comala Document Management CQL Rest API page together with the Atlassian Confluence CQL fields. In addition, if the K15t Scroll Versions app is installed and the Scroll Search option is enabled for a space, Scroll Page content can be selected in Confluence Search and CQL can be added to the document states report macro to search for Scroll Page content such as the Scroll page version.

Using CQL filters in the document-states-report macro

Simply add the CQL format filter (see - Confluence CQL keywords) to the CQL filter dialogue box in the document-states-report macro editor



For example, the following pages all have the label hr in a space.


But our added CQL filter will cause the report to display only the page(s) that have both the label hr and were created by the user matilde.


You can use functions in the CQL, for example, the following includes an OR function.



This will display content that has either

  • the label hr

OR

  • has been created by the user matilde



(info) Filters are additive, if there are any logical clashes then no results will be returned

The CQL field awphasworkflow=true is always applied so content without a workflow will not be included in the report.

Other compatible CQL filters include

  • contributor=username
  • creator=username
  • label=labelname
  • title=pagetitle

Beware that errors may occur when the specified CQL filter and the macro filter options overlap.

Atlassian CQL also has limitations that mean that certain field types only support certain operators. 

For example, Atlassian CQL filter ORDER BY does not support ordering for all fields. Generally, ordering is not supported where a piece of content can have multiple values for a field, for instance ordering is not supported on labels (see: CQL function reference).

CQL filter examples

There is no content with the specified labels


Related links

Comala Document Management documentation

Atlassian documentation