CQL Query for "Page Status"

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

With Automation for confluence now live, I was wondering if there is a way (via CQL) to query for "Page Status" in confluence?

5 answers

3 accepted

1 vote
Answer accepted
Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 21, 2023

@Ken Young 

May I ask what automation action you want to fire based on the Confluence page status?

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 23, 2023

Hi @Levente Szabo _Midori_ .  My goal is to have an administered status for pages  (ie. not to us tags) and to be able to automate documentation "freshness" checks.   The CQL would provide the metadata for the lifecycle of the document. Some documents can be marked "Don't review" and be ignored (via the CQL), others in different statuses could then  have notification workflows automatically kicked off, or associated Jira Tickets created to track the "updates" to the docs.

 

Thx

Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
January 25, 2023

In this case, I recommend looking into the dedicated Confluence lifecycle management solution, Better Content Archiving for Confluence. After becoming a go-to tool for Data Center and Server, it is now available for Cloud as well.

Better Content Archiving allows you to create your own set of statuses with their CQL definitions and build your content status schemes. The app automatically classifies content based on your rules and you can launch content review workflows using notification emails.

The app is prepared for processing a large number of pages in enterprise Confluence sites, and the UI is also geared toward managing many spaces and pages conveniently. 

As a next step of the launch process, automatic archiving of Confluence pages will also be available.

confluence-cloud-review-status-label.png

(Please note that I'm part of the team developing Better Content Archiving for Confluence.)

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2023

Thanks for the product info.

 

Honestly, would rather fix via automation because it is a simple use case that really doesn't need to have larger reoccurring monthly cost.  Hopefully this information is exposed to CQL in the future.

Like # people like this
0 votes
Answer accepted
Derek F. April 4, 2023

Hey @Ken Young did you get this resolved? 

 

It doesn't look like we have access to anything like "page.status" in the documentation at https://developer.atlassian.com/server/confluence/advanced-searching-using-cql/. However, there is access to labels ... but I don't see a way to copy the status to the labels.

 

fwiw, we use Workflows for Confluence for approvals in a "draft" space that, once approved, get published to a "public" space

 

EDIT: I created an issue for this at CONFCLOUD-75625

 Vote for it!

 

 

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 5, 2023

Thanks for the reply.  We are already utilizing quite a few plugins, so trying to avoid adding another one.  We will just us Jira until this becomes an available feature.

0 votes
Answer accepted
Ashley Hudson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Heya @Ken Young ,

I believe the CQL you are looking for is the following:

space = "xxx" AND status = XXX 

I hope this helps and let me know if you have any other questions!

Kind Regards,

Ashley Hudson

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

 I couldn't seem to find this in the CQL docs. Thank you Ashley. 

Ashley Hudson
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

Sweet! Glad I could help! :)

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2023

I spoke to soon--- I am getting the error: 

Invalid CQL

No field exists with the name: 'status

Kristján Geir Mathiesen
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2023

Man, sooooo close. I am looking for the exact same. Did you figure it out, @Ken Young ?

Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 4, 2023

@Kristján Geir Mathiesen No solution.  To be honest I haven' tried again.  I haven't been looking at release notes to see if this was exposed yet.

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2023

I didn't work for me, either. I got the same error message as @Ken Young ... Weird.

Patrick Wittman August 14, 2024

@Ken Young If you haven't seen this yet, this has now been added to CQL but I also haven't seen it reference in the CQL documentation.

the element is actually `pageStatus`

So if you wanted to filter and only show pages with the Verified page status you can use pageStatus = "Verified" in your CQL query and it will only return pages that have that status.

Like Stephan Hannach likes this
Ken Young
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 14, 2024

Thank you @Patrick Wittman I will have to take a look to check it out.  I did a quick basic query in a branch rule and it worked as expected..

1 vote
Jonathan Smith
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 11, 2024

@Ken Young 

In automation, I found I can only utilize page status data with the {{smart values}} condition.

  • In my case, when published and page status = Empty, change the page status to Draft.

This fails when I try the CQL condition, but the smart values condition seems to work.

hello.png

Patrick Wittman August 14, 2024

I haven't tried using this in automation yet, however, you can now target the page status in CQL using `pageStatus`. I haven't seen this element added to the CQL documentation yet but it does work.

For example if I want to filter to pages with the status of Verified then in my CQL query I can use pageStatus = "Verified" and the query will only return pages with that page status.

1 vote
Anastasia Bek _Stiltsoft_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 2, 2023

G-Day @Ken Young 

We can relate to the need to have an administered status for pages and to be able to automate documentation relevance checks. This is why our team has delivered Handy Page Status and Handy Page Status Report functionalities based on the following data to ace in our reporting journeys with help of our Handy Macros for Confluence 

The report can be administered by the following data:

  • Confluence spaces where the status is set
  • Handy Page Status sets
  • Handy Page Status options
  • Confluence users who set the status
  • Handy Page Status dates

And can look like this:

HPSR.png

Feel free to check out and play with these macros of Handy Macros for Confluence  to elevate page status administration

Best wishes. 

Anastasia

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events