This article explains how to receive the last comment made on the issue in the email notification using Email Issue Post-function.
Use case: The last comment made on the issue should add while sending an email on a transition of the workflow.
Instructions
Navigate to the desired workflow transition and add the Transition Issue post function.
Add the target transition Id of the specific workflow and custom field Id based on your Jira instance.
code
<% if (transientVars.comment) { %> A reply has been recieved on ${issue.key}: ${transientVars.comment} <% } %>
r
r
r
r
r