Hi!
I want to add a specific label to a Confluence page if it's moved TO a specific parent.
When: Page moved
If: space.key = 123 AND parent = 456
Then: Add label
label
This almost worked as intended. It added a label when a page was moved FROM the parent instead of TO the parent.
Does anyone know what I can do to fix that?
I found this question because I was struggling with this exact same problem. The problem is indeed that you cannot configure where you move a page to, when the trigger is "When: Page moved".
The solution I ended up using, is simply by reversing the question, and that got me where I wanted. It might not be exactly suitable for you, but I thought I would write it down anyway.
What you're trying is: "When: page moved" then "add label".
I changed the rule to: "When: page labelled" then "Move Page". That allows you to configure where you move the page to. The difference is, of course, that you have to instruct your team exactly which labels to use in which circumstances. But honestly, I much prefer this, because it allows you to configure the exact destination of the page.
And there is an added benefit to this: that way, I can add a restriction to the space preventing anyone moving pages manually (accidentally or otherwise).
Hi @Ashok Rao ,
I'm glad you found my question and I'm sorry you have the same problem.
Way to go to think outside the box and reverse the question! Unfortunately I can't use this since I don't want all pages I label with that label to move to one parent. My label is too generic for that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Max Elfving _Ålander_ your question intrigued me so I tested this out myself, and this doesn't seem possible using the "When page moved" trigger. The problem with that trigger is the "space" and "parent" conditions are being evaluated against the original page location instead of the final page location. In "Jira Automation" I would use the Re-fetch issue data action, to get the new issue properties (page in this case), but there isn't an equivalent action for "Confluence Automation".
As a workaround I was able to use the "Scheduled" trigger to add labels to the child pages of a specific parent page. My rule looks like:
This successfully adds the "ABC" label to the child pages on whatever schedule it runs at. Note: Remember to add the label != "label" condition to the CQL statement, so the label is only added to pages where its missing. If you don't do this the label will be added (it just overwrites the existing label) every time the rule runs, which will unnecessarily increase your automation usage which could potentially see you start hitting the usage limits.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Connor,
thanks for taking your time to look into this!
I think your approach makes sense so I tried it. Unfortunately I it didn't work for me.
When I ran the rule the status was "Some errors" and the action details said
"
CQL COnDItion
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.