Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

A way to build an automation to remove the label from the original document but not the copy?

Saša Rosić-Milinković
Contributor
September 29, 2024

Hey all,

I use a label to always ensure that the latest release notes for my products are pinned on the relevant pages of our scroll viewport site.

I generally create the release notes by copying the latest release notes, deleting the content within them and adding new one. I know I can make a template for this, but I do it specifically so I don't forget to add the label to it and remove the label from the old release notes - which I do on occasion forget to do and have to correct later on.

I've tried building an automation that basically says:

If page is copied

Then remove the label 'scroll-help-center-pinned-page'

However, that removes the label from the copied page, and not the original, so the exact opposite of what I want to happen.

Is there a way around this?

 

2 answers

2 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.
September 30, 2024

It seems to me that the "page copied" trigger doesn't offer the original page in a smart value. So your approach will not work.

Workaround idea:

Using the "page copied" trigger, in the rule run this CQL:

label = 'scroll-help-center-pinned-page' and created < now("-10m")

It will basically return every page that is older than 10 minutes and has that label. If there are zero hits, then all page is fine. If there is one hit, then it is the original page -> you can remove the label from {{page}}.

Even if it doesn't work as is, it may give you an idea.

Saša Rosić-Milinković
Contributor
September 30, 2024

Hmm, this would work if I only had this in one space across the entire Confluence documentation base. However, we have release notes written/published in multiple spaces. You might've given me an idea though; I'll try to create one that would only remove the label from any documents in the same space where the new document was copied from (if you have an idea on what this could look like, feel free to suggest).

 

Thanks for the great suggestion!

Like Aron Gombas _Midori_ likes this
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.
September 30, 2024

Note that there is a concept of "space-specific" automation rule!

There are "global" rules, but there are the ones that are active only within a space. So I think you can just use those.

Saša Rosić-Milinković
Contributor
September 30, 2024

@Aron Gombas _Midori_ I just realized this yesterday afternoon, and I am working with space-specific automation for that reason. However, this CQL didn't have the desired effect. This is how I built the rule:

image.png

Any suggestions on how I can tinker with this to try and make it work?

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 2, 2024

No, this is not what I mean.

What the rule above does: it is triggered by a page copy, then the test the new page (not the original one!) if it was created more than 10 minutes ago and has the label, then removes the label. It is obviously not what you want, it doesn't do anything.

What the rule should do: it is triggered by a page copy, but completely ignores the smart values populated by the trigger. Instead it runs the CQL, then removes the label from all pages resulted from the CQL. For this, you should use the Related entities kind of branching, I think.

Like John Funk likes this
0 votes
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2024

Hi Saša,

Can you share the rule that you have so far?

Saša Rosić-Milinković
Contributor
September 30, 2024

Hi @John Funk

Here's a screenshot:

image.png

Suggest an answer

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

Atlassian Community Events