Hi
I am fairly new to Confluence automation and have tried creating a rule, where in a page tree where the parent page has a specified word in the title, all child pages and the parent page get a specified label. We have a central application in our company that most people in our department work with and therefore we have many pages relating to this app. As they are mostly under one parent page named after this app, this would be a huge time saver for us.
I have tried the following structure, but that does not work. Has anyone created a similar rule before or could give me some insight in how to implement such a rule? (placeholder for the name of the app added for privacy reasons).
@melanie_boehmer As @Bill Sheboy wrote, the Scheduled trigger will not produce a list of pages.
You need to add a Related entities branching component to the rule and use the corresponding CQL, something like:
title ~ "name of the app"
I do not believe the Scheduled trigger for Confluence rules references any pages, and so the rule condition would find nothing.
When do you want to run this rule, such as when a page is created or edited?
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I mostly need it as a one time run. We are restructuring our Confluence site currently and are rearranging the pages. In the course of this rearranging, I want all of the pages under this particular parent page to get the label. Most of our teams are not using labels at the moment which is why a lot of the pages have no labels at all which limits our use of certain features in Confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information. And for the one-time update to add the label, please try the branching with CQL as Aron suggested:
You could run the rule manually until caught up and then disable (or delete) it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for your assistance. I ran this rule and it worked in labeling all the pages with the keyword in the title. No I just have to figure out a second rule to add the same label to all the child pages of the ones the first rule has labeled.
I have to admit that while the basics of automation are very intuitive, as soon as it becomes more complex, I struggle. I have some basic coding experience but have never used a query language. I have been trying to use the documentation but am struggling with the wording.
I have had a look at the documentation of Advanced Searching using CQL. If I understand it correctly, if I want to perform an action on all child pages of a specific page, I can use the "ancestor" field. However, all the examples only show how to choose a specific page as the ancestor, rather than an ancestor based on a condition (such as having a specific label). Is this possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.