CQL filter - filter pages by current user

Overview

This is an example of using a CQL filter of the document states report macro to create a dynamic report. CQL filter is used to create

  • a report displaying workflow information for content created by the current user

There are examples of additional CQL filter values that can be used to exclude the report being displayed to specific users.

The CQL Filter parameter now accepts Confluence CQL format functions, keywords, and can include OR and comparison operators (from v.6.16.7+). Simply add the CQL format filter to the CQL filter dialogue box in the document-states-report macro editor.

Filter pages by user field

To report on pages created by the current user you can use

This will display the report in context with the current user - displaying only content they have created. It's useful as a personalized report item for your team dashboard page.

Adding the following CQL filter will report on content where at least one of the three listed users either created the content or contributed to the content.

  • creator in (matilde, wolfgang, sami) or contributor in (matilde, wolfgang, sami)

You can exclude a user by using the NOT EQUALS operator (!=)

  • creator != "suni"

Multiple values can be excluded by separate use of != or simply using the NOT IN operator

  • creator NOT IN (suni, elle, moeen)

Prior to v6.16.7 CQL filter in report macros must be in the form FieldName:Value

Comala Document Management CQL filter examples

Related documentation

Atlassian documentation