Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation That labels child pages

Todd Winton
Contributor
July 30, 2025

I have created automation that adds a label if the text of the page title contains Business Rules.  This works fine.  However, I would like for all child pages of that page to also get the same label.  I have not implemented yet as the CQL says this will apply to all pages in the space, so want to avoid that.  Here is what I have.  Should this work?

Confluence Automation.png

1 answer

0 votes
Aron Gombas
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.
July 31, 2025

I think in the CQL you should use a clause like this:

ancestor = <the ID of the current page>

You should the corresponding smart value instead of my dummy placeholder, of course. It should give you the idea though.

That way, the query will return those descendants of the page that are not labeled with "business_rules".

Todd Winton
Contributor
July 31, 2025

So this space is a large space the contains page trees for each of our customers, approximately 200.  Each customer will have a parent page that contains Business Rules in the title.  I would like to have this apply to existing child pages of the business rules parent page.  In your suggestion you reference a specific page ID.  Does that work for my use case?

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