Forums

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

Automation - Rules

Ivan Zuniga Alegria
Contributor
July 16, 2025

Hello,

I created an automated rule when I transition the issue/ticket from IN PROGRESS to RESOLVED, then send an email to the reporter and the email must contain the las comment made that was filled in the option Reply to Customer.

I'm using this Smart Value {{issue.comments.last.body}}

The problem is that if the comment is an internal note the reporter/customer also get the internal note.

how can I filter this to send only the comment when is made in the field reply to customer?

internal note.png

3 answers

2 accepted

5 votes
Answer accepted
John Funk
Community Champion
July 16, 2025

Hi Ivan - Welcome to the Atlassian Community!

You should be able to add a condition to check for that. Take a look at this previous post to see if it helps. 

https://community.atlassian.com/forums/Jira-questions/Recognize-internal-comment-in-Automation-for-JIRA/qaq-p/796326

 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 16, 2025

Hi @Ivan Zuniga Alegria -- Welcome to the Atlassian Community!

Adding to John's suggestion...

You may do this in two steps: find the comments which were not internally flagged, storing them in a Created Variable, and then get the most recent one (last, non-empty one in the list).  For example, and assuming these are issues in a JSM project:

  • create variable:
    • name: varNotInternalComments
    • smart value: 
{{#issue.comments}}{{#if(not(internal))}}{{body}}~~ {{/}}{{/}}
  • something that needs the last, non-internal comment
{{varNotInternalComments.split("~~ ").match("(.++)").last}}

 

Kind regards,
Bill

Like # people like this
Ivan Zuniga Alegria
Contributor
July 17, 2025

Super thanks @Bill Sheboy working!!!

Like # people like this
2 votes
Answer accepted
Trudy Claspill
Community Champion
July 16, 2025

Hello @Ivan Zuniga Alegria 

Welcome to the Atlassian community.

I want to clarify a point in your requirement.

You are looking for the last comment entered using the Reply to Customer option.

That would mean that the comment was public, not internal.

Comments made by Customers are also marked as public.

You would also need to check for the last public comment where the comment author was a JSM Agent since they are the only ones who can use the Reply to Customer option.

Have I understood your requirement correctly?

Ivan Zuniga Alegria
Contributor
July 17, 2025

@Trudy Claspill You're right, very good observation I tested @Bill Sheboy response and I need to filter as well the author!

Thank you! 

Like # people like this
2 votes
Martin Runge
Community Champion
July 16, 2025

Hi Ivan,

I haven't tried it myself, but I wonder if something like this could help: {{issue.comments.last}}{{^internal}}{{body}}{{/}}{{/}}

Cheers Martin.

Suggest an answer

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

Atlassian Community Events