Send mail last comment from post function in scriptrunner

nihcet September 6, 2019

Hi,

I want to only add last comment to the email. But if there is only one comment in the issue, I can't send. If there are two or more comments, I can send last comment.

JIRA v712.1

Scriptrunner v5.6.1

Thanks for help.

 

TALEBİNİZ:
<br>
$issue.description
<br>
<br>
"<% if (mostRecentComment)
out << "COZUM: " << mostRecentComment
%>"
<br>
<br>
Bu mail XXX Yardım Masası tarafından gönderilmiştir. Sorununuz devam ediyor ise lütfen yeni bir çağrı açınız. Lütfen bu e-postayı cevaplamayınız.

 

1 answer

0 votes
Manuel Bastardo Castellano
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.
September 6, 2019

Try with lastComment but notice if don't have a comment returns null as describe here:

 

https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_send_a_custom_email

Suggest an answer

Log in or Sign up to answer