Confluence Automation: Archive inactive pages when scheduled (recurring) ONLY without children

Michael Jordi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 12, 2023

How can I archive inactive pages when scheduled (recurring) ONLY if they do not have any children?

Currently I am having this one here...

(type = page AND ((lastmodified < now("-12M")) AND (created < now("-18M")))) AND space in ("XYZ")


...but if a page gets archived with children, all children move up the hierachie and this creates quite a mess

1 answer

0 votes
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.
October 13, 2023

You can't, I am afraid.

In CQL, you can test for parent and even for ancestors, but there is no CQL field for children or descendants. If there were, then you'd append a clause like these to your query:

... and children is empty

... and descendants is empty

Suggest an answer

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

Atlassian Community Events