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?
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:
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
Can you please explain what is it that you want to achieve? Maybe there is another way to do this.
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.