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

Confluence Comment Smart Values

Seth Wiggins March 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
Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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.state}}

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.

Trev Angle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 29, 2024

Update: The CQL branch now outputs the full smart values along with {{cqlResult}}. See more info https://community.atlassian.com/t5/Confluence-articles/MANY-New-Smart-Values-Added-to-Automation-for-Confluence/ba-p/2588511

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.
March 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