The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to report an external vs internal comment in the output of an automation

Steve Hyde
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!
February 25, 2024

In JSM Cloud, I have an automation rule that runs against all open issues that are in an "awaiting" status that have not been updated in over a week.
The automation then sends an email to the assignee (and after a few more days their manager) informing them that they need to update the issue.

The email contains the text and the smart values
The most recent comment on this issue was by {{issue.comments.last.author.displayName}} on {{issue.comments.last.created.longDateTime}} and states "{{issue.comments.last.body}}"

which produces the output
The most recent comment on this issue was by Steve Hyde on February 25, 2024 at 6:05:13 PM UTC and states "External Comment"

Is there any way that I can distinguish in the smart values whether a comment was external or internal, and only report the body of the last external comment ?

**EDIT**
I've found the {{comment.internal}} smart value that returns true or false on whether a comment is internal or not, but haven't found a way to use that to parse the comments to identify the most recent external one and report the body of that particular comment.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Kris Dewachter
Community Champion
February 26, 2024

Hi @Steve Hyde ,

I guess your best chance is to create an  "Advanced Branch" in your automation rule to loop over the comments, and select the most recent external one. I guess the comments will be sorted in a specific order (newest or oldest first).

Best regards,

Kris

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events