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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,552,627
Community Members
 
Community Events
184
Community Groups

Confluence Comment Smart Values

Seth Wiggins
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!
Mar 25, 2023

I am looking to loop through the comments on a page when the status of the page changes. 

Using the branch rule/ related entities, I filter by content = type and then try to access each comment with {{comment.body}}. 

However, it only returns null and logs nothing.

Any ideas? 

Screen Shot 2023-03-25 at 10.03.15 AM.png

2 answers

2 accepted

0 votes
Answer accepted
Trevor Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 27, 2023

Hi all, Trevor here from the Confluence automation team. The documentation around the CQL branch is in need of an update, as there is no such thing as a component "modifying the trigger". I have flagged this to our documentation people!

As far as your question @Seth Wiggins, the problem is that the CQL branch does not expose a {{comment}} smart value, it instead exposes a {{cqlResult}} smart value which does not support all the same fields (unfortunately this is also not adequately explained in the documentation right now). The following fields are supported at this time:

  • {{cqlResult.type}}
  • {{cqlResult.id}}
  • {{cqlResult.title}}
  • {{cqlResult.status}}

If you need to access the comment's body you unfortunately cannot do that directly from the CQL branch smart value. But depending on your use case we may be able to find a workaround.

0 votes
Answer accepted
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 27, 2023

HI @Seth Wiggins and welcome to the community,

From what I understood form the CQL documentation and tested on my instance, the entities branch will work well if the entities are related to the trigger:

For each CQL result will modify the trigger. In order for this branch to work properly, your CQL query must relate to the object of the rule’s trigger.

Having said that, whenever I tried to use your trigger, the comments always returned null. But when the trigger was "Page or blog commented", the {{comments.body}} returned with a value:

confluence rule.png

Can you please explain what is it that you want to achieve? Maybe there is another way to do this.

Suggest an answer

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

Atlassian Community Events