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?
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.
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:
{{#issue.comments}}{{#if(not(internal))}}{{body}}~~ {{/}}{{/}}
{{varNotInternalComments.split("~~ ").match("(.++)").last}}
Kind regards,
Bill
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.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trudy Claspill You're right, very good observation I tested @Bill Sheboy response and I need to filter as well the author!
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ivan,
I haven't tried it myself, but I wonder if something like this could help: {{issue.comments.last}}{{^internal}}{{body}}{{/}}{{/}}
Cheers Martin.
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.